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

View file

@ -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,
},
{

View file

@ -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,
},
}

View file

@ -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)