Added noice.nvim, might change some of the settings later

This commit is contained in:
2025-04-26 13:58:36 +03:00
parent f49c9899d1
commit ccdf0d4594
5 changed files with 114 additions and 7 deletions

View File

@@ -15,7 +15,6 @@
"code-playground.nvim": { "branch": "main", "commit": "b57abbaadc52c3d79e06c19dad0212774111a796" },
"conform.nvim": { "branch": "master", "commit": "372fc521f8421b7830ea6db4d6ea3bae1c77548c" },
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
"edgy.nvim": { "branch": "main", "commit": "7e8dedc39abebe40c289b8012cc89b11c69aa7a0" },
"gitsigns.nvim": { "branch": "main", "commit": "b79047e81f645875e500b4f433d8133bc421446c" },
"gopher.nvim": { "branch": "main", "commit": "9db5931af1293ae52500921d92c02145d86df02c" },
"harpoon": { "branch": "harpoon2", "commit": "ed1f853847ffd04b2b61c314865665e1dadf22c7" },
@@ -33,9 +32,9 @@
"mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" },
"mason-tool-installer.nvim": { "branch": "main", "commit": "1255518cb067e038a4755f5cb3e980f79b6ab89c" },
"mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" },
"mini.nvim": { "branch": "main", "commit": "05975f387906211745d0aaf996eb7ad3c91b193d" },
"neogen": { "branch": "main", "commit": "05d754004da8c89115b291f2a23ca530a8cac8fd" },
"neogit": { "branch": "master", "commit": "9bb1e73c534f767607e0a888f3de4c942825c501" },
"noice.nvim": { "branch": "main", "commit": "0427460c2d7f673ad60eb02b35f5e9926cf67c59" },
"nui.nvim": { "branch": "main", "commit": "8d5b0b568517935d3c84f257f272ef004d9f5a59" },
"nvim-autopairs": { "branch": "master", "commit": "4d74e75913832866aa7de35e4202463ddf6efd1b" },
"nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
@@ -67,7 +66,6 @@
"rustaceanvim": { "branch": "master", "commit": "e9c5aaba16fead831379d5f44617547a90b913c7" },
"snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" },
"spring-boot.nvim": { "branch": "main", "commit": "218c0c26c14d99feca778e4d13f5ec3e8b1b60f0" },
"sqls.nvim": { "branch": "main", "commit": "d1bc5421ef3e8edc5101e37edbb7de6639207a09" },
"telescope.nvim": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" },
"tiny-inline-diagnostic.nvim": { "branch": "main", "commit": "cd401038de4cbae37651cfe02510294ccf5cdc98" },
"todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" },
@@ -76,7 +74,6 @@
"vim-be-good": { "branch": "master", "commit": "0ae3de14eb8efc6effe7704b5e46495e91931cc5" },
"vim-illuminate": { "branch": "master", "commit": "1fa4b23409e22a03823648e344c77f260e2572cb" },
"vim-repeat": { "branch": "master", "commit": "65846025c15494983dafe5e3b46c8f88ab2e9635" },
"vim-suda": { "branch": "master", "commit": "9adda7d195222d4e2854efb2a88005a120296c47" },
"vim-tmux-navigator": { "branch": "master", "commit": "791dacfcfc8ccb7f6eb1c853050883b03e5a22fe" },
"vim-wakatime": { "branch": "master", "commit": "e46d7c4f98ee0f40782008dd60cb2a79c377fb1d" },
"vscode-codicons": { "branch": "main", "commit": "17ce4c853be20e26901867ab3442c1e353096f6d" }

View File

@@ -71,6 +71,11 @@ lualine.setup({
function()
return lsp_progress.progress()
end,
{
require('noice').api.status.mode.get,
cond = require('noice').api.status.mode.has,
color = { fg = '#ff9e64' },
},
},
lualine_x = {
'searchcount',

View File

@@ -2,7 +2,7 @@ return {
'rmagatti/auto-session',
lazy = false,
opts = {
auto_session_suppress_dirs = { '~/', '/' },
suppressed_dirs = { '~/', '/' },
session_lens = { load_on_setup = false },
no_restore_cmds = {
function()

View File

@@ -0,0 +1,99 @@
return {
'folke/noice.nvim',
event = 'VeryLazy',
opts = {
notify = { enabled = false },
lsp = {
progress = { enabled = false },
-- override markdown rendering so that **cmp** and other plugins use **Treesitter**
override = {
-- override the default lsp markdown formatter with Noice
['vim.lsp.util.convert_input_to_markdown_lines'] = true,
-- override the lsp markdown formatter with Noice
['vim.lsp.util.stylize_markdown'] = true,
-- override cmp documentation with Noice (needs the other options to work)
['cmp.entry.get_documentation'] = true, -- requires hrsh7th/nvim-cmp
},
hover = {
enabled = true,
silent = false, -- set to true to not show a message if hover is not available
view = nil, -- when nil, use defaults from documentation
---@type NoiceViewOptions
opts = {}, -- merged with defaults from documentation
},
signature = {
enabled = true,
auto_open = {
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
},
view = nil, -- when nil, use defaults from documentation
---@type NoiceViewOptions
opts = {}, -- merged with defaults from documentation
},
message = {
-- Messages shown by lsp servers
enabled = true,
view = 'notify',
opts = {},
},
-- defaults for hover and signature help
documentation = {
view = 'hover',
---@type NoiceViewOptions
opts = {
lang = 'markdown',
replace = true,
render = 'plain',
format = { '{message}' },
win_options = { concealcursor = 'n', conceallevel = 3 },
},
},
},
-- you can enable a preset for easier configuration
cmdline = {
enabled = true, -- enables the Noice cmdline UI
view = 'cmdline_popup', -- view for rendering the cmdline. Change to `cmdline` to get a classic cmdline at the bottom
-- view = 'cmdline', -- view for rendering the cmdline. Change to `cmdline` to get a classic cmdline at the bottom
format = {
cmdline = { pattern = '^:', icon = '', lang = 'vim' },
search_down = { kind = 'search', pattern = '^/', icon = ' ', lang = 'regex' },
search_up = { kind = 'search', pattern = '^%?', icon = ' ', lang = 'regex' },
terminal = { 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 = { view = 'cmdline_input', icon = '󰥻 ' }, -- Used by input()
-- lua = false, -- to disable a format, set to `false`
},
opts = {},
},
routes = {
{
filter = {
event = 'msg_show',
kind = 'search_count',
},
opts = { skip = true },
},
{
filter = {
event = 'msg_show',
kind = '',
find = 'written',
},
opts = { skip = true },
},
},
presets = {
bottom_search = true, -- use a classic bottom cmdline for search
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 = true, -- add a border to hover docs and signature help
},
},
dependencies = {
'MunifTanjim/nui.nvim',
},
}

View File

@@ -20,12 +20,18 @@ return {
---@type snacks.notifier.style
style = 'compact',
filter = function(notif)
local filtered_messages = { 'No information available', 'No code actions available' }
for _, msg in ipairs(filtered_messages) do
local exact_filter = { 'No information available', 'No code actions available' }
local contains_filter = { 'fewer lines', 'lines indented', 'lines yanked' }
for _, msg in ipairs(exact_filter) do
if notif.msg == msg then
return false
end
end
for _, msg in ipairs(contains_filter) do
if string.find(notif.msg, msg) then
return false
end
end
return true
end,
},