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

refactor(theme)!: decouple tokyonight options #3384

Merged
merged 3 commits into from Nov 2, 2022
Merged

Conversation

kylo252
Copy link
Collaborator

@kylo252 kylo252 commented Nov 1, 2022

Description

(refactor!) decouple tokyonight options

moves lvim.builtin.theme.options into lvim.builtin.theme.tokyonight.options since they are
specific to how tokyonight is configured.

(refactor) better deprecation handling

  • all the deprecated options are now in a single file
  • use __newindex to handle new entries
  • this gives us much better flexibility (e.g. this can handle lvim.builtin.theme.options.dummy)
  • and it allows us to generate a trace where that action was last defined

misc

  • chore: remove merge duplicate

related #3313, #3378

How Has This Been Tested?

-- add this somewhere in your config
lvim.builtin.theme.options.dim_inactive = true

@kylo252 kylo252 added the high-priority Issues of high priority label Nov 1, 2022
@LostNeophyte
Copy link
Member

LostNeophyte commented Nov 1, 2022

lvim.builtin.dashboard.abc = 1 does work,
but lvim.builtin.dashboard.abc.def = 1 does not
We could use automagic tables to handle it
They allow this:

a = AutomagicTable()
a.b.c.d = "a.b and a.b.c are automatically created"

and lvim.lsp.popup_border.abc = 1 says that abc is deprecated and not popup_border

@kylo252
Copy link
Collaborator Author

kylo252 commented Nov 2, 2022

We could use automagic tables to handle it

@LostNeophyte, this seems quite useful.

Let's iterate on that in a separate PR, in case there are some (performance) gotchas involved.

@kylo252 kylo252 merged commit 8d3f9b8 into master Nov 2, 2022
@kylo252 kylo252 deleted the deprecate-handler branch November 2, 2022 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
high-priority Issues of high priority
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants