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(#275): do not overwrite colorscheme highlights #276

Merged
merged 1 commit into from
May 29, 2023

Conversation

dasupradyumna
Copy link
Contributor

@dasupradyumna dasupradyumna commented May 18, 2023

Context

Highlight groups set by colorschemes are overwritten by nvim-dap-ui plugin in the require("dapui.config").highlights.lua:setup() method, instead of just setting the fallback default highlight groups.
More information can be found in #275 and #178.


Changes

  1. Modified the method to set the defaults for highlight groups instead of overwriting previously set highlights.
  2. Added a helper function to use the newer nvim_get_hl API function if NeoVim's version is atleast 0.9.
  3. Cleaned up the setup() method logic by moving the error checking (pcall) into the helper function.

  Highlights set by colorschemes are overwritten by `nvim-dap-ui` plugin
  in the `require("dapui.config").highlights.lua:setup()` method.
  Modified the method to set the defaults for highlight groups instead
  of overwriting previously set highlights (typically by colorschemes).
  Added a helper function to use the newer `nvim_get_hl` API function if
  NeoVim's version is atleast 0.9.
@dasupradyumna
Copy link
Contributor Author

Hey @rcarriga,
Can you please review these changes and provide any suggestions?
Cheers ~

@rcarriga
Copy link
Owner

LGTM, thanks for the PR!

@rcarriga rcarriga merged commit c020f66 into rcarriga:master May 29, 2023
y1rn added a commit to y1rn/nvim-dap-ui that referenced this pull request May 30, 2023
fix(highlights): preserve colorscheme settings  (rcarriga#276)
@nyngwang
Copy link
Contributor

@dasupradyumna Thank you! Just confirmed that the fix works! Thanks for fixing the issue I care a lot!

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.

3 participants