fix: lsp and diagnostic highlight priority (#17461)

Closes https://github.com/neovim/neovim/issues/17456

* treesitter uses the default highlight priority of 50
* diagnostic highlights have a priority of 150
* lsp reference highlights have a priority of 200

This ensures proper ordering.
This commit is contained in:
Michael Lingelbach 2022-02-19 08:38:14 -08:00 committed by GitHub
parent 5cb45dffba
commit 791e400858
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View File

@ -920,7 +920,10 @@ M.handlers.underline = {
underline_ns,
higroup,
{ diagnostic.lnum, diagnostic.col },
{ diagnostic.end_lnum, diagnostic.end_col }
{ diagnostic.end_lnum, diagnostic.end_col },
'v',
false,
150
)
end
save_extmarks(underline_ns, bufnr)

View File

@ -1551,9 +1551,9 @@ do --[[ References ]]
document_highlight_kind[kind],
{ start_line, start_idx },
{ end_line, end_idx },
nil,
'v',
false,
40)
200)
end
end
end