1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
|
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 },
},
{
view = 'popup',
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',
},
}
|