-
Notifications
You must be signed in to change notification settings - Fork 64
/
Copy pathdress.lua
32 lines (29 loc) · 810 Bytes
/
dress.lua
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
local M = {}
M.config = function()
local status_ok, dressing = pcall(require, "dressing")
if not status_ok then
return
end
dressing.setup {
input = {
get_config = function()
if lvim.builtin.noice.active then
return { enabled = false }
end
if vim.api.nvim_get_option_value("filetype", { buf = 0 }) == "neo-tree" then
return { enabled = false }
end
end,
},
select = {
format_item_override = {
codeaction = function(action_tuple)
local title = action_tuple.action.title:gsub("\r\n", "\\r\\n")
local client = vim.lsp.get_client_by_id(action_tuple.ctx.client_id)
return string.format("%s\t[%s]", title:gsub("\n", "\\n"), client.name)
end,
},
},
}
end
return M