From 8e6acc1a5335ebf77b420bc3f01c1be334838255 Mon Sep 17 00:00:00 2001 From: xesc Date: Fri, 27 Sep 2024 23:00:03 +0200 Subject: [PATCH] add noice as ui-component | add more mappings for harpoon --- lua/plugin/harpoon.lua | 9 +++++++++ lua/plugin/noice.lua | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 lua/plugin/noice.lua diff --git a/lua/plugin/harpoon.lua b/lua/plugin/harpoon.lua index b8b2b32..cc26cb9 100644 --- a/lua/plugin/harpoon.lua +++ b/lua/plugin/harpoon.lua @@ -17,6 +17,15 @@ return { vim.keymap.set("n", "e", function() harpoon:list():select(2) end) vim.keymap.set("n", "i", function() harpoon:list():select(3) end) vim.keymap.set("n", "o", function() harpoon:list():select(4) end) + vim.keymap.set("n", "1", function() harpoon:list():select(1) end) + vim.keymap.set("n", "2", function() harpoon:list():select(2) end) + vim.keymap.set("n", "3", function() harpoon:list():select(3) end) + vim.keymap.set("n", "4", function() harpoon:list():select(4) end) + vim.keymap.set("n", "5", function() harpoon:list():select(5) end) + vim.keymap.set("n", "6", function() harpoon:list():select(6) end) + vim.keymap.set("n", "7", function() harpoon:list():select(7) end) + vim.keymap.set("n", "8", function() harpoon:list():select(8) end) + vim.keymap.set("n", "9", function() harpoon:list():select(9) end) -- Toggle previous & next buffers stored within Harpoon list vim.keymap.set("n", "", function() harpoon:list():prev() end) diff --git a/lua/plugin/noice.lua b/lua/plugin/noice.lua new file mode 100644 index 0000000..63bd18c --- /dev/null +++ b/lua/plugin/noice.lua @@ -0,0 +1,34 @@ +return { + { + "folke/noice.nvim", + event = "VeryLazy", + config = function() + require("noice").setup({ + lsp = { + -- override markdown rendering so that **cmp** and other plugins use **Treesitter** + override = { + ["vim.lsp.util.convert_input_to_markdown_lines"] = true, + ["vim.lsp.util.stylize_markdown"] = true, + ["cmp.entry.get_documentation"] = true, -- requires hrsh7th/nvim-cmp + }, + }, + -- you can enable a preset for easier configuration + presets = { + bottom_search = false, -- use a classic bottom cmdline for search + command_palette = true, -- position the cmdline and popupmenu together + long_message_to_split = true, -- long messages will be sent to a split + inc_rename = false, -- enables an input dialog for inc-rename.nvim + lsp_doc_border = false, -- add a border to hover docs and signature help + }, + }) + end, + dependencies = { + -- if you lazy-load any plugin below, make sure to add proper `module="..."` entries + "MunifTanjim/nui.nvim", + -- OPTIONAL: + -- `nvim-notify` is only needed, if you want to use the notification view. + -- If not available, we use `mini` as the fallback + "rcarriga/nvim-notify", + } + } +}