Skip to content

Commit

Permalink
fix: drop useless/harmful nvim_set_hl_ns (#393)
Browse files Browse the repository at this point in the history
The highlight absolutely does not need to be in the same namespace as
the extmarks, and we definitely do not need to globally change the
highlight namespace, as that might interfere with other plugins or the
user's config or whatever.

And it happens to break background colors in floats (such as LSP hover,
diagnostic detail, completion help, etc.) due to a bug in neovim:
neovim/neovim#30262
  • Loading branch information
liskin authored Dec 12, 2024
1 parent e6b78ec commit 916538e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lua/iron/core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -663,8 +663,7 @@ core.setup = function(opts)
}


(vim.api.nvim__set_hl_ns or vim.api.nvim_set_hl_ns)(config.namespace)
vim.api.nvim_set_hl(config.namespace, config.highlight_last, hl_cfg)
vim.api.nvim_set_hl(0, config.highlight_last, hl_cfg)
end

for _, command in ipairs(commands) do
Expand Down

0 comments on commit 916538e

Please sign in to comment.