From ab82ecb00199535785b9186d3aacbf9884eba7dc Mon Sep 17 00:00:00 2001 From: kyasuda Date: Thu, 21 Aug 2025 16:57:51 -0700 Subject: [PATCH] update noice --- .config/nvim/lua/plugins/noice.lua | 48 ++++++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 3 deletions(-) diff --git a/.config/nvim/lua/plugins/noice.lua b/.config/nvim/lua/plugins/noice.lua index 59f6a94..5e139d7 100644 --- a/.config/nvim/lua/plugins/noice.lua +++ b/.config/nvim/lua/plugins/noice.lua @@ -16,8 +16,8 @@ return { }, -- 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, + ["vim.lsp.util.convert_input_to_markdown_lines"] = false, + ["vim.lsp.util.stylize_markdown"] = false, ["cmp.entry.get_documentation"] = true, -- requires hrsh7th/nvim-cmp }, hover = { @@ -30,7 +30,7 @@ return { signature = { enabled = true, auto_open = { - enabled = false, + enabled = true, trigger = true, -- Automatically show signature help when typing a trigger character from the LSP luasnip = true, -- Will open signature help when jumping to Luasnip insert nodes throttle = 50, -- Debounce lsp signature help request by 50ms @@ -81,6 +81,48 @@ return { }, }, }, + popupmenu = { + enabled = true, -- enables the Noice popupmenu UI + ---@type 'nui'|'cmp' + backend = "cmp", -- backend to use to show regular cmdline completions + ---@type NoicePopupmenuItemKind|false + -- Icons for completion item kinds (see defaults at noice.config.icons.kinds) + kind_icons = {}, -- set to `false` to disable icons + }, + notify = { + -- Noice can be used as `vim.notify` so you can route any notification like other messages + -- Notification messages have their level and other properties set. + -- event is always "notify" and kind can be any log level as a string + -- The default routes will forward notifications to nvim-notify + -- Benefit of using Noice for this is the routing and consistent history view + enabled = true, + view = "notify", + }, + documentation = { + view = "hover", + ---@type NoiceViewOptions + opts = { + lang = "markdown", + replace = true, + render = "plain", + format = { "{message}" }, + win_options = { concealcursor = "n", conceallevel = 3 }, + }, + }, + markdown = { + hover = { + ["|(%S-)|"] = vim.cmd.help, -- vim help links + ["%[.-%]%((%S-)%)"] = require("noice.util").open, -- markdown links + }, + highlights = { + ["|%S-|"] = "@text.reference", + ["@%S+"] = "@parameter", + ["^%s*(Parameters:)"] = "@text.title", + ["^%s*(Return:)"] = "@text.title", + ["^%s*(See also:)"] = "@text.title", + ["{%S-}"] = "@parameter", + }, + }, }, dependencies = { -- if you lazy-load any plugin below, make sure to add proper `module="..."` entries