feat(neovim): add plugin for beauty command line

This commit is contained in:
thek4n 2023-12-20 15:52:45 +03:00
parent 61de98bcd0
commit 2db818a35e
3 changed files with 25 additions and 3 deletions

View File

@ -1,7 +1,7 @@
return { return {
'ggandor/leap.nvim', 'ggandor/leap.nvim',
keys = { keys = {
{ 'gs', '<Plug>(leap-forward-to)' }, { 'J', '<Plug>(leap-forward-to)' },
{ 'gS', '<Plug>(leap-backward-to)' }, { 'K', '<Plug>(leap-backward-to)' },
} }
} }

View File

@ -12,7 +12,6 @@ local on_attach = function(client, bufnr)
-- See `:help vim.lsp.*` for documentation on any of the below functions -- See `:help vim.lsp.*` for documentation on any of the below functions
buf_set_keymap('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<CR>', opts) buf_set_keymap('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<CR>', opts)
buf_set_keymap('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<CR>', opts) buf_set_keymap('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<CR>', opts)
buf_set_keymap('n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>', opts)
buf_set_keymap('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts) buf_set_keymap('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts)
buf_set_keymap('n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts) buf_set_keymap('n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts)
buf_set_keymap('n', '<space>wa', '<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>', opts) buf_set_keymap('n', '<space>wa', '<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>', opts)

View File

@ -0,0 +1,23 @@
return {
"folke/noice.nvim",
config = function()
require("noice").setup({
cmdline = {
enabled = true, -- enables the Noice cmdline UI
view = "cmdline_popup",
format = {
cmdline = { pattern = "^:", icon = "", lang = "vim" },
search_down = { kind = "search", pattern = "^/", icon = " ", lang = "regex" },
search_up = { kind = "search", pattern = "^%?", icon = " ", lang = "regex" },
filter = { pattern = "^:%s*!", icon = "$", lang = "bash" },
lua = { pattern = { "^:%s*lua%s+", "^:%s*lua%s*=%s*", "^:%s*=%s*" }, icon = "", lang = "lua" },
help = { pattern = "^:%s*he?l?p?%s+", icon = "" },
input = {},
},
},
messages = {
enabled = false,
},
})
end,
}