Open crides opened 1 year ago
Yes, the extmark (buf-local highlight) has different priority: semshi has priority 4096 and diagnostics has a fixed priority 150.
-- vim.api.nvim_buf_get_extmarks(0, -1, 0, -1, {details=true})
{ 1, 4, 0, {
end_col = 13,
end_right_gravity = false,
end_row = 4,
hl_eol = false,
hl_group = "DiagnosticUnderlineWarn",
ns_id = 61,
priority = 150,
right_gravity = true
} }
{ 1, 4, 7, {
end_col = 13,
end_right_gravity = false,
end_row = 4,
hl_eol = false,
hl_group = "semshiImported",
ns_id = 321173,
priority = 4096,
right_gravity = true
} }
From https://github.com/neovim/neovim/commit/791e400858ae8d32f974b40c4e1c0d54b66f610f:
So I think it makes sense semshi should use priority around 100. Since semshi uses nvim_buf_add_highlight
(which does not support setting priority) instead of nvim_buf_set_extmark
, we will need to migrate to the extmark API first.
In this screenshot, the
pprint
is highlighted withDianosticUnnecessary
(linked toComment
), butsemshiImported
overwrote it. Is it possible to change the highlight priority so thatDianosticUnnecessary
is shown?neovim 0.9.0
, withpyright
lsp