NOTICKET: Improved Notifications and Keybindings

This commit is contained in:
Snoweuph 2025-02-17 17:10:06 +01:00
parent 52934decf2
commit bdb2c2415a
Signed by: snoweuph
GPG key ID: BEFC41DA223CEC55
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,4 +1,5 @@
return { return {
{
'folke/noice.nvim', 'folke/noice.nvim',
dependencies = { dependencies = {
'MunifTanjim/nui.nvim', 'MunifTanjim/nui.nvim',
@ -22,4 +23,15 @@ return {
}, },
}) })
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)