mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-06-24 13:24:39 +00:00
lsp: fix deprecated diagnostic functions
This commit is contained in:
parent
7fca440370
commit
210157715f
1 changed files with 28 additions and 2 deletions
|
|
@ -103,8 +103,34 @@ in {
|
||||||
${mkBinding mappings.goToType "vim.lsp.buf.type_definition"}
|
${mkBinding mappings.goToType "vim.lsp.buf.type_definition"}
|
||||||
${mkBinding mappings.listImplementations "vim.lsp.buf.implementation"}
|
${mkBinding mappings.listImplementations "vim.lsp.buf.implementation"}
|
||||||
${mkBinding mappings.listReferences "vim.lsp.buf.references"}
|
${mkBinding mappings.listReferences "vim.lsp.buf.references"}
|
||||||
${mkBinding mappings.nextDiagnostic "vim.diagnostic.goto_next"}
|
${mkBinding mappings.nextDiagnostic ''
|
||||||
${mkBinding mappings.previousDiagnostic "vim.diagnostic.goto_prev"}
|
function()
|
||||||
|
vim.diagnostic.jump({
|
||||||
|
count = 1,
|
||||||
|
on_jump = function(_, bufnr)
|
||||||
|
vim.diagnostic.open_float({
|
||||||
|
scope = "cursor",
|
||||||
|
bufnr = bufnr,
|
||||||
|
focus = false,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
''}
|
||||||
|
${mkBinding mappings.previousDiagnostic ''
|
||||||
|
function()
|
||||||
|
vim.diagnostic.jump({
|
||||||
|
count = -1,
|
||||||
|
on_jump = function(_, bufnr)
|
||||||
|
vim.diagnostic.open_float({
|
||||||
|
scope = "cursor",
|
||||||
|
bufnr = bufnr,
|
||||||
|
focus = false,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
''}
|
||||||
${mkBinding mappings.openDiagnosticFloat "vim.diagnostic.open_float"}
|
${mkBinding mappings.openDiagnosticFloat "vim.diagnostic.open_float"}
|
||||||
${mkBinding mappings.documentHighlight "vim.lsp.buf.document_highlight"}
|
${mkBinding mappings.documentHighlight "vim.lsp.buf.document_highlight"}
|
||||||
${mkBinding mappings.listDocumentSymbols "vim.lsp.buf.document_symbol"}
|
${mkBinding mappings.listDocumentSymbols "vim.lsp.buf.document_symbol"}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue