From 2db818a35e81c92c3806124fef0f26c8e7837645 Mon Sep 17 00:00:00 2001 From: thek4n Date: Wed, 20 Dec 2023 15:52:45 +0300 Subject: [PATCH] feat(neovim): add plugin for beauty command line --- .../.config/nvim/lua/base/plugins/leap.lua | 4 ++-- .../.config/nvim/lua/base/plugins/mason.lua | 1 - .../.config/nvim/lua/base/plugins/noice.lua | 23 +++++++++++++++++++ 3 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 home/user/.config/nvim/lua/base/plugins/noice.lua diff --git a/home/user/.config/nvim/lua/base/plugins/leap.lua b/home/user/.config/nvim/lua/base/plugins/leap.lua index 0b8625c..3474ac6 100644 --- a/home/user/.config/nvim/lua/base/plugins/leap.lua +++ b/home/user/.config/nvim/lua/base/plugins/leap.lua @@ -1,7 +1,7 @@ return { 'ggandor/leap.nvim', keys = { - { 'gs', '(leap-forward-to)' }, - { 'gS', '(leap-backward-to)' }, + { 'J', '(leap-forward-to)' }, + { 'K', '(leap-backward-to)' }, } } diff --git a/home/user/.config/nvim/lua/base/plugins/mason.lua b/home/user/.config/nvim/lua/base/plugins/mason.lua index a961ff6..676b62c 100644 --- a/home/user/.config/nvim/lua/base/plugins/mason.lua +++ b/home/user/.config/nvim/lua/base/plugins/mason.lua @@ -12,7 +12,6 @@ local on_attach = function(client, bufnr) -- See `:help vim.lsp.*` for documentation on any of the below functions buf_set_keymap('n', 'gD', 'lua vim.lsp.buf.declaration()', opts) buf_set_keymap('n', 'gd', 'lua vim.lsp.buf.definition()', opts) - buf_set_keymap('n', 'K', 'lua vim.lsp.buf.hover()', opts) buf_set_keymap('n', 'gi', 'lua vim.lsp.buf.implementation()', opts) buf_set_keymap('n', '', 'lua vim.lsp.buf.signature_help()', opts) buf_set_keymap('n', 'wa', 'lua vim.lsp.buf.add_workspace_folder()', opts) diff --git a/home/user/.config/nvim/lua/base/plugins/noice.lua b/home/user/.config/nvim/lua/base/plugins/noice.lua new file mode 100644 index 0000000..f1a68c6 --- /dev/null +++ b/home/user/.config/nvim/lua/base/plugins/noice.lua @@ -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, +}