Compare commits

...
Sign in to create a new pull request.

1 commit

Author SHA1 Message Date
bdb2c2415a
NOTICKET: Improved Notifications and Keybindings 2025-02-17 17:10:06 +01:00
4 changed files with 52 additions and 27 deletions

View file

@ -163,17 +163,17 @@ K.CODE = {
}, },
GOTO_DEFINITION = { GOTO_DEFINITION = {
mode = 'n', mode = 'n',
shortcut = '<Leader>cgd', shortcut = '<Leader>cg',
description = 'Go to Definition', description = 'Go to Definition',
}, },
PEEK_DEFINITION = { PEEK_DEFINITION = {
mode = 'n', mode = 'n',
shortcut = '<Leader>cpd', shortcut = '<Leader>cp',
description = 'Peek Code Definition', description = 'Peek Code Definition',
}, },
GOTO_REFERENCES = { GOTO_REFERENCES = {
mode = 'n', mode = 'n',
shortcut = '<Leader>cgr', shortcut = '<Leader>cr',
description = 'Go to References', description = 'Go to References',
}, },
ACTIONS = { ACTIONS = {
@ -181,6 +181,11 @@ K.CODE = {
shortcut = '<Leader>ca', shortcut = '<Leader>ca',
description = 'Do Code Actions', description = 'Do Code Actions',
}, },
ERROR = {
mode = 'n',
shortcut = '<leader>ce',
description = 'Show Code Errors',
},
FORMAT = { FORMAT = {
mode = 'n', mode = 'n',
shortcut = '<Leader>cf', shortcut = '<Leader>cf',
@ -188,7 +193,7 @@ K.CODE = {
}, },
RENAME = { RENAME = {
mode = 'n', mode = 'n',
shortcut = '<Leader>cr', shortcut = '<Leader>cn',
description = 'Rename Variable', description = 'Rename Variable',
}, },
} }

View file

@ -56,6 +56,12 @@ return {
vim.lsp.buf.code_action, vim.lsp.buf.code_action,
{ desc = K.CODE.ACTIONS.description } { 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, end,
}, },
{ {

View file

@ -1,25 +1,37 @@
return { return {
'folke/noice.nvim', {
dependencies = { 'folke/noice.nvim',
'MunifTanjim/nui.nvim', dependencies = {
'rcarriga/nvim-notify', 'MunifTanjim/nui.nvim',
}, 'rcarriga/nvim-notify',
config = function() },
require('noice').setup({ config = function()
lsp = { require('noice').setup({
override = { lsp = {
['vim.lsp.util.convert_input_to_markdown_lines'] = true, override = {
['vim.lsp.util.stylize_markdown'] = true, ['vim.lsp.util.convert_input_to_markdown_lines'] = true,
['cmp.entry.get_documentation'] = true, ['vim.lsp.util.stylize_markdown'] = true,
['cmp.entry.get_documentation'] = true,
},
}, },
}, presets = {
presets = { bottom_search = false,
bottom_search = false, command_palette = true,
command_palette = true, long_message_to_split = true,
long_message_to_split = true, inc_rename = false,
inc_rename = false, lsp_doc_border = false,
lsp_doc_border = false, },
}, })
}) end,
end, },
{
'rcarriga/nvim-notify',
config = function()
local notify = require('notify')
notify.setup({
render = 'wrapped-compact',
timeout = 750,
})
end,
},
} }

View file

@ -12,7 +12,9 @@ function M.setup()
null_ls.builtins.diagnostics.alex, null_ls.builtins.diagnostics.alex,
null_ls.builtins.diagnostics.trail_space, null_ls.builtins.diagnostics.trail_space,
-- Formatter -- Formatter
null_ls.builtins.diagnostics.markdownlint, null_ls.builtins.diagnostics.markdownlint.with({
extra_args = { '--disable', 'MD024' }, -- Duplicate Headings
}),
} }
end) end)