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

fix(config): options.darken.sidebars.enabled #343

Merged
merged 1 commit into from
Jul 18, 2024

Conversation

tmillr
Copy link
Member

@tmillr tmillr commented Jul 10, 2024

Problem: options.darken.sidebars.enabled and options.darken.sidebars.enable both exist, but it is only one option. The default in config.lua is enable, but it is referred to as enabled as well (both in code and docs). It used to be enable but was renamed to enabled, so it is technically supposed to be options.darken.sidebars.enabled at this time (as of this commit's parent).

Solution: Deprecate and revert options.darken.sidebars.enabled back to options.darken.sidebars.enable. This brings it back in-line with the changelog and runtime deprecation checks. enable is also more consistent as this is what is used in other parts of the config (e.g. config for modules).

Problem: In a couple of places, options.darken.sidebars is checked for truthiness. This seems to be a typo of options.darken.sidebars.enable which is a boolean (unlike the former, which is a table by default and also documented as a table). Tables are always truthy.

Solution: Use options.darken.sidebars.enable instead of options.darken.sidebars in conditionals.

Reverts: fff3e20, 806903c
Fixes: #306

@tmillr tmillr changed the title fix(config): options.darken.floats and options.darken.sidebars.enabled fix(config): options.darken.sidebars.enabled Jul 12, 2024
@tmillr
Copy link
Member Author

tmillr commented Jul 12, 2024

TODO

  • Obtain review
  • Tests
  • Deprecate options.darken.sidebars.enabled
  • Update CHANGELOG.md documenting the rename/deprecation

Note

I didn't add this to the vimdoc changelog, nor the vimdoc deprecations file, but I don't feel like this is necessary since it was never extensively documented (there) when it was changed from enable to enabled either.

@tmillr tmillr force-pushed the fix-options-darken branch 4 times, most recently from 9743808 to 7c350eb Compare July 12, 2024 19:16
@tmillr tmillr requested a review from ful1e5 July 12, 2024 19:28
@tmillr tmillr added the bug Something isn't working label Jul 13, 2024
Problem: `options.darken.sidebars.enabled` and
         `options.darken.sidebars.enable` both exist, but it is only one
         option. The default in `config.lua` is `enable`, but it is
         referred to as `enabled` as well (both in code and docs). It
         used to be `enable` but was renamed to `enabled`, so it is
         technically supposed to be `options.darken.sidebars.enabled` at
         this time (as of this commit's parent).

Solution: Deprecate and revert `options.darken.sidebars.enabled` back to
          `options.darken.sidebars.enable`. This brings it back in-line
          with the changelog and runtime deprecation checks. `enable` is
          also more consistent as this is what is used in other parts
          of the config (e.g. config for `modules`).

Problem: In a couple of places, `options.darken.sidebars` is checked for
         truthiness. This seems to be a typo of
         `options.darken.sidebars.enable` which is a boolean (unlike the
         former, which is a table by default and also documented as a
         table). Tables are always truthy.

Solution: Use `options.darken.sidebars.enable` instead of
          `options.darken.sidebars` in conditionals.

Reverts: fff3e20
Reverts: 806903c
Fixes: projekt0n#306
@tmillr tmillr merged commit 80fb5cc into projekt0n:main Jul 18, 2024
25 checks passed
@tmillr tmillr deleted the fix-options-darken branch July 18, 2024 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sidebar is not darkened when configured to do so (affects neo-tree, etc.)
1 participant