From c40345d69b44f558cc892563ee9c8999cc8b7e44 Mon Sep 17 00:00:00 2001 From: Huck Boles Date: Sat, 13 May 2023 17:37:03 -0500 Subject: [PATCH] lsp maps --- lua/huck/map.lua | 3 ++- lua/plugins/lsp.lua | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) 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 }) -- 2.45.2