Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow --dark to override dark/light detected from syntax theme #1843

Merged
merged 12 commits into from
Sep 8, 2024

Conversation

bash
Copy link
Contributor

@bash bash commented Sep 4, 2024

(Probably) Resolves #1713

Currently a light syntax theme (like GitHub) will always set the decorations to light mode too, even if --dark is passed.

I took the chance to add missing test cases in test_syntax_theme_selection and clean up the match a bit :)

Note that since dark/light detection is done outside get_is_light_mode_and_syntax_theme_name a terminal detected to be dark will also win against a light syntax theme. I'm not sure if this is the behavior we want, but it's already the case for light terminal vs dark syntax theme.

src/options/theme.rs Outdated Show resolved Hide resolved
src/options/theme.rs Outdated Show resolved Hide resolved
@th1000s th1000s merged commit 3ccdd2d into dandavison:main Sep 8, 2024
13 checks passed
@bash bash deleted the dark branch September 8, 2024 22:59
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Sep 13, 2024
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [dandavison/delta](https://github.com/dandavison/delta) | patch | `0.18.1` -> `0.18.2` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>dandavison/delta (dandavison/delta)</summary>

### [`v0.18.2`](https://github.com/dandavison/delta/releases/tag/0.18.2)

[Compare Source](dandavison/delta@0.18.1...0.18.2)

This patch release fixes various panics reported by users that were due to v0.1.13 of the `unicode-width` crate. See dandavison/delta#1858 and unicode-rs/unicode-width#66.

#### What's Changed

-   Move AmbiguousDiffMinusCounter to hunk_header by [@&#8203;dandavison](https://github.com/dandavison) in dandavison/delta#1825
-   Fix `Catppuccin Latte` name in `LIGHT_SYNTAX_THEMES` list by [@&#8203;injust](https://github.com/injust) in dandavison/delta#1823
-   Handle quoted file paths in hunk headers by [@&#8203;th1000s](https://github.com/th1000s) in dandavison/delta#1840
-   Fix clippy warnings by [@&#8203;bash](https://github.com/bash) in dandavison/delta#1851
-   Allow `--dark` to override dark/light detected from syntax theme by [@&#8203;bash](https://github.com/bash) in dandavison/delta#1843
-   Upgrade and pin unicode-width to v0.1.12 by [@&#8203;th1000s](https://github.com/th1000s) in dandavison/delta#1858

**Full Changelog**: dandavison/delta@0.18.1...0.18.2

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
izumin5210 pushed a commit to izumin5210/dotfiles that referenced this pull request Sep 15, 2024
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [dandavison/delta](https://redirect.github.com/dandavison/delta) |
patch | `0.18.1` -> `0.18.2` |

---

### Release Notes

<details>
<summary>dandavison/delta (dandavison/delta)</summary>

###
[`v0.18.2`](https://redirect.github.com/dandavison/delta/releases/tag/0.18.2)

[Compare
Source](https://redirect.github.com/dandavison/delta/compare/0.18.1...0.18.2)

This patch release fixes various panics reported by users that were due
to v0.1.13 of the `unicode-width` crate. See
[dandavison/delta#1858
and
[unicode-rs/unicode-width#66.

#### What's Changed

- Move AmbiguousDiffMinusCounter to hunk_header by
[@&#8203;dandavison](https://redirect.github.com/dandavison) in
[dandavison/delta#1825
- Fix `Catppuccin Latte` name in `LIGHT_SYNTAX_THEMES` list by
[@&#8203;injust](https://redirect.github.com/injust) in
[dandavison/delta#1823
- Handle quoted file paths in hunk headers by
[@&#8203;th1000s](https://redirect.github.com/th1000s) in
[dandavison/delta#1840
- Fix clippy warnings by
[@&#8203;bash](https://redirect.github.com/bash) in
[dandavison/delta#1851
- Allow `--dark` to override dark/light detected from syntax theme by
[@&#8203;bash](https://redirect.github.com/bash) in
[dandavison/delta#1843
- Upgrade and pin unicode-width to v0.1.12 by
[@&#8203;th1000s](https://redirect.github.com/th1000s) in
[dandavison/delta#1858

**Full Changelog**:
dandavison/delta@0.18.1...0.18.2

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/izumin5210/dotfiles).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC43NC4xIiwidXBkYXRlZEluVmVyIjoiMzguNzQuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: izumin5210-update-aqua-checksum[bot] <169593670+izumin5210-update-aqua-checksum[bot]@users.noreply.github.com>
renovate bot added a commit to d-issy/dotfiles that referenced this pull request Sep 15, 2024
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [dandavison/delta](https://redirect.github.com/dandavison/delta) |
patch | `0.18.1` -> `0.18.2` |

---

### Release Notes

<details>
<summary>dandavison/delta (dandavison/delta)</summary>

###
[`v0.18.2`](https://redirect.github.com/dandavison/delta/releases/tag/0.18.2)

[Compare
Source](https://redirect.github.com/dandavison/delta/compare/0.18.1...0.18.2)

This patch release fixes various panics reported by users that were due
to v0.1.13 of the `unicode-width` crate. See
[dandavison/delta#1858
and
[unicode-rs/unicode-width#66.

#### What's Changed

- Move AmbiguousDiffMinusCounter to hunk_header by
[@&#8203;dandavison](https://redirect.github.com/dandavison) in
[dandavison/delta#1825
- Fix `Catppuccin Latte` name in `LIGHT_SYNTAX_THEMES` list by
[@&#8203;injust](https://redirect.github.com/injust) in
[dandavison/delta#1823
- Handle quoted file paths in hunk headers by
[@&#8203;th1000s](https://redirect.github.com/th1000s) in
[dandavison/delta#1840
- Fix clippy warnings by
[@&#8203;bash](https://redirect.github.com/bash) in
[dandavison/delta#1851
- Allow `--dark` to override dark/light detected from syntax theme by
[@&#8203;bash](https://redirect.github.com/bash) in
[dandavison/delta#1843
- Upgrade and pin unicode-width to v0.1.12 by
[@&#8203;th1000s](https://redirect.github.com/th1000s) in
[dandavison/delta#1858

**Full Changelog**:
dandavison/delta@0.18.1...0.18.2

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/d-issy/dotfiles).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC43NC4xIiwidXBkYXRlZEluVmVyIjoiMzguNzQuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 Dark theme doesn't seem to be working
3 participants