forked from snoweuph/Dotfiles_nvim
NOTICKET: Improved Notifications and Keybindings
This commit is contained in:
parent
52934decf2
commit
bdb2c2415a
4 changed files with 52 additions and 27 deletions
|
@ -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',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -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,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -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,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -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)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue