diff --git a/lua/core/keymap.lua b/lua/core/keymap.lua index 91f5764..c93c0a7 100644 --- a/lua/core/keymap.lua +++ b/lua/core/keymap.lua @@ -163,17 +163,17 @@ K.CODE = { }, GOTO_DEFINITION = { mode = 'n', - shortcut = 'cgd', + shortcut = 'cg', description = 'Go to Definition', }, PEEK_DEFINITION = { mode = 'n', - shortcut = 'cpd', + shortcut = 'cp', description = 'Peek Code Definition', }, GOTO_REFERENCES = { mode = 'n', - shortcut = 'cgr', + shortcut = 'cr', description = 'Go to References', }, ACTIONS = { @@ -181,6 +181,11 @@ K.CODE = { shortcut = 'ca', description = 'Do Code Actions', }, + ERROR = { + mode = 'n', + shortcut = 'ce', + description = 'Show Code Errors', + }, FORMAT = { mode = 'n', shortcut = 'cf', @@ -188,7 +193,7 @@ K.CODE = { }, RENAME = { mode = 'n', - shortcut = 'cr', + shortcut = 'cn', description = 'Rename Variable', }, } diff --git a/lua/editor/language_server.lua b/lua/editor/language_server.lua index 75ee123..5de54d6 100644 --- a/lua/editor/language_server.lua +++ b/lua/editor/language_server.lua @@ -56,6 +56,12 @@ return { vim.lsp.buf.code_action, { desc = K.CODE.ACTIONS.description } ) + vim.keymap.set( + K.CODE.ERROR.mode, + K.CODE.ERROR.shortcut, + vim.diagnostic.open_float, + { desc = K.CODE.ERROR.description } + ) end, }, { diff --git a/lua/editor/ui.lua b/lua/editor/ui.lua index e630bcb..64137af 100644 --- a/lua/editor/ui.lua +++ b/lua/editor/ui.lua @@ -1,25 +1,37 @@ return { - 'folke/noice.nvim', - dependencies = { - 'MunifTanjim/nui.nvim', - 'rcarriga/nvim-notify', - }, - config = function() - require('noice').setup({ - lsp = { - override = { - ['vim.lsp.util.convert_input_to_markdown_lines'] = true, - ['vim.lsp.util.stylize_markdown'] = true, - ['cmp.entry.get_documentation'] = true, + { + 'folke/noice.nvim', + dependencies = { + 'MunifTanjim/nui.nvim', + 'rcarriga/nvim-notify', + }, + config = function() + require('noice').setup({ + lsp = { + override = { + ['vim.lsp.util.convert_input_to_markdown_lines'] = true, + ['vim.lsp.util.stylize_markdown'] = true, + ['cmp.entry.get_documentation'] = true, + }, }, - }, - presets = { - bottom_search = false, - command_palette = true, - long_message_to_split = true, - inc_rename = false, - lsp_doc_border = false, - }, - }) - end, + presets = { + bottom_search = false, + command_palette = true, + long_message_to_split = true, + inc_rename = false, + lsp_doc_border = false, + }, + }) + end, + }, + { + 'rcarriga/nvim-notify', + config = function() + local notify = require('notify') + notify.setup({ + render = 'wrapped-compact', + timeout = 750, + }) + end, + }, } diff --git a/lua/toolchain/text.lua b/lua/toolchain/text.lua index 19c70c2..7ee1c22 100644 --- a/lua/toolchain/text.lua +++ b/lua/toolchain/text.lua @@ -12,7 +12,9 @@ function M.setup() null_ls.builtins.diagnostics.alex, null_ls.builtins.diagnostics.trail_space, -- Formatter - null_ls.builtins.diagnostics.markdownlint, + null_ls.builtins.diagnostics.markdownlint.with({ + extra_args = { '--disable', 'MD024' }, -- Duplicate Headings + }), } end)