Skip to content

Commit 1a6bef3

Browse files
anthraxxigorlfs
authored andcommitted
feat(highlight): Do not force override highlight groups
Don't override existing definition by using `nvim_set_hl` default options. This fixes issues depending on load order of themes and style adjustments and the actual `dap-view` plugin setup by only setting highlight groups in `dap-view` whenever they don't exist yet. This allows users to override specific groups on demand and no matter in which order the adjustments, themes and plugins are loaded, the user's custom override will be preserved instead of overwriting them with `dap-view` default definitions. Related: https://neovim.io/doc/user/api.html#nvim_set_hl() Related: https://neovim.io/doc/user/syntax.html#%3Ahi-default
1 parent 25ffcf3 commit 1a6bef3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/dap-view/highlight.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ local api = vim.api
55
---@param name string
66
---@param link string
77
local hl_create = function(name, link)
8-
api.nvim_set_hl(0, globals.HL_PREFIX .. name, { link = link })
8+
api.nvim_set_hl(0, globals.HL_PREFIX .. name, { default = true, link = link })
99
end
1010

1111
local define_base_links = function()

0 commit comments

Comments
 (0)