From 2d0cbe47aeadf252472ddf2880980310731af8d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20Rocha=20Magalh=C3=A3es?= Date: Thu, 17 Apr 2025 20:19:03 -0300 Subject: [PATCH] Added noice plugin to use noice UI --- lua/core/plugins/init.lua | 2 ++ lua/core/plugins/noice.lua | 17 +++++++++++++++++ lua/core/setup/init.lua | 1 + lua/core/setup/noice.lua | 18 ++++++++++++++++++ 4 files changed, 38 insertions(+) create mode 100644 lua/core/plugins/noice.lua create mode 100644 lua/core/setup/noice.lua diff --git a/lua/core/plugins/init.lua b/lua/core/plugins/init.lua index 1f88ccfa..23bb5af7 100644 --- a/lua/core/plugins/init.lua +++ b/lua/core/plugins/init.lua @@ -185,6 +185,8 @@ local plugins = { require 'core.plugins.copilot', require 'core.plugins.markdown-preview', + + require 'core.plugins.noice', } local pluginOptions = {} diff --git a/lua/core/plugins/noice.lua b/lua/core/plugins/noice.lua new file mode 100644 index 00000000..1d6c0f69 --- /dev/null +++ b/lua/core/plugins/noice.lua @@ -0,0 +1,17 @@ +return { + { + "folke/noice.nvim", + event = "VeryLazy", + opts = { + -- add any options here + }, + 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", + } + } +} diff --git a/lua/core/setup/init.lua b/lua/core/setup/init.lua index 69da5ad2..3fe39818 100644 --- a/lua/core/setup/init.lua +++ b/lua/core/setup/init.lua @@ -4,3 +4,4 @@ import('file-search') import('syntax-highlight') import('language-servers') import('completion-engine') +import('noice') diff --git a/lua/core/setup/noice.lua b/lua/core/setup/noice.lua new file mode 100644 index 00000000..4389ca7b --- /dev/null +++ b/lua/core/setup/noice.lua @@ -0,0 +1,18 @@ +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 = true, -- 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 + }, +})