diff --git a/README.md b/README.md index 51590f5..4a2bd6a 100644 --- a/README.md +++ b/README.md @@ -258,7 +258,7 @@ require'navigator'.setup({ -- The attach code will apply to all LSP clients default_mapping = true, -- set to false if you will remap every key or if you using old version of nvim- - keymaps = {{key = "gK", func = vim.lsp.declaration, doc = 'declaration'}}, -- a list of key maps + keymaps = {{key = "gK", func = vim.lsp.declaration, desc = 'declaration'}}, -- a list of key maps -- this kepmap gK will override "gD" mapping function declaration() in default kepmap -- please check mapping.lua for all keymaps treesitter_analysis = true, -- treesitter variable context diff --git a/playground/init.lua b/playground/init.lua index f13b687..af6d763 100644 --- a/playground/init.lua +++ b/playground/init.lua @@ -41,14 +41,23 @@ local function load_plugins() use({ 'ray-x/lsp_signature.nvim' }) use({ 'ray-x/aurora' }) use({ - 'ray-x/navigator.lua', - -- '~/github/ray-x/navigator.lua', + -- 'ray-x/navigator.lua', + '~/github/ray-x/navigator.lua', requires = { 'ray-x/guihua.lua', run = 'cd lua/fzy && make' }, config = function() require('navigator').setup({ - lsp_signature_help = true, debug = true, - keymaps = { { key = 'gK', func = vim.lsp.buf.definition, doc = 'definition' } }, + keymaps = { + { key = 'gK', func = vim.lsp.buf.definition, doc = 'definition' }, + { + key = 'ld', + func = require('navigator.diagnostics').show_buf_diagnostics, + desc = 'show_buf_diagnostics', + }, + }, + icons = { + diagnostic_virtual_text = '', + }, }) end, })