-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnoice-config.lua
More file actions
132 lines (128 loc) · 3.42 KB
/
noice-config.lua
File metadata and controls
132 lines (128 loc) · 3.42 KB
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
local M = {
'folke/noice.nvim',
lazy = false,
}
M.opts = {
views = {
hover = {
focusable = false,
border = {
style = 'none',
padding = { 1, 2 },
},
position = { row = 2, col = 0 },
win_options = {
wrap = true,
linebreak = true,
winblend = 10,
winhighlight = { Normal = 'Pmenu', FloatBorder = 'Pmenu', Search = 'NONE' }
},
},
confirm = {
backend = 'popup',
position = {
row = '100%',
col = 0,
},
size = {
height = 'auto',
width = '100%',
},
format = { ' {confirm}' },
},
mini = {
win_options = { winblend = 0 },
timeout = 5000,
},
cmdline = {
win_options = { winblend = 0 },
},
split = {
size = '30%'
},
popup = {
border = {
style = 'solid',
},
},
},
messages = {
view_search = false,
},
cmdline = {
view = 'cmdline',
format = {
cmdline = { icon = ' COMMAND ' },
search_down = { icon = ' Search ' },
search_up = { icon = ' Search ' },
calculator = { icon = ' Calculator ', icon_hl_group = 'NoiceCmdlineIconFilter' },
help = { icon = ' Help ' },
input = { view = 'cmdline' },
lua = false,
}
},
popupmenu = {
enabled = true,
},
commands = {
history = {
opts = {
format = {
'{date} ',
'{event}', { '{kind} ', before = { '.', hl_group = 'NoiceFormatKind' } },
'{title} ',
'{cmdline}',
'\n',
'{level} ',
'{message}\n',
},
},
filter_opts = { reverse = true },
filter = {
any = {
{ warning = true },
{ error = true },
{ event = 'notify' },
{ event = 'msg_show' },
{ event = 'lsp', kind = 'message' },
},
},
}
},
lsp = {
progress = { enabled = false },
hover = { enabled = true, },
signature = { enabled = true },
override = {
['vim.lsp.util.convert_input_to_markdown_lines'] = true,
['vim.lsp.util.stylize_markdown'] = true,
}
},
}
M.keys = function()
local noice_keymaps = require('config.keymaps').noice
return {
{ noice_keymaps.history, '<Cmd>Noice<CR>' },
{
noice_keymaps.docs_scroll_down,
function()
if not require('noice.lsp').scroll(4) then
return noice_keymaps.docs_scroll_down
end
end,
silent = true,
expr = true,
},
{
noice_keymaps.docs_scroll_up,
function()
if not require('noice.lsp').scroll(-4) then
return noice_keymaps.docs_scroll_up
end
end,
silent = true,
expr = true,
},
}
end
return M