From: Huck Boles Date: Sat, 13 May 2023 22:37:03 +0000 (-0500) Subject: lsp maps X-Git-Url: https://git.huck.website/?a=commitdiff_plain;h=c40345d69b44f558cc892563ee9c8999cc8b7e44;p=nvim.git lsp maps --- diff --git a/lua/huck/map.lua b/lua/huck/map.lua index 72a8c90..00dd39b 100644 --- a/lua/huck/map.lua +++ b/lua/huck/map.lua @@ -37,10 +37,11 @@ vim.keymap.set('n', 'Q', 'so') vim.keymap.set('t', '', [[]]) vim.keymap.set('t', '', [[]]) --- lsp diagnostic navigation +-- lsp diagnostics vim.keymap.set('n', 'n', vim.diagnostic.goto_next) vim.keymap.set('n', 'p', vim.diagnostic.goto_prev) vim.keymap.set('n', 'r', vim.lsp.buf.rename) +vim.keymap.set('n', 'a', vim.lsp.buf.code_action) vim.keymap.set('n', 'k', vim.lsp.buf.hover) vim.keymap.set('n', 'K', vim.diagnostic.open_float) diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index edd0d24..a9226d0 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -54,8 +54,6 @@ return { { "┃", "FloatBorder" }, } - local signs = { Error = ">>", Warn = "> ", Hint = "- ", Info = " " } - vim.lsp.diagnostics = { signs = true, underline = true, @@ -63,6 +61,7 @@ return { severity_sort = { reverse = true }, } + local signs = { Error = ">>", Warn = "> ", Hint = "- ", Info = " " } for type, icon in pairs(signs) do local hl = "DiagnosticSign" .. type vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })