-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbarbecue-nvim.lua
More file actions
47 lines (45 loc) · 1.26 KB
/
barbecue-nvim.lua
File metadata and controls
47 lines (45 loc) · 1.26 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
return {
"utilyre/barbecue.nvim",
version = "*",
dependencies = {
"SmiteshP/nvim-navic",
"nvim-tree/nvim-web-devicons", -- optional dependency
},
config = function()
require("barbecue").setup({
create_autocmd = false,
attach_navic = false, -- in some cases the data is nil and causes errors
symbols = {
separator = "▶",
},
kinds = require("config.icons").kinds,
})
vim.api.nvim_create_autocmd({
"WinResized",
"BufWinEnter",
"CursorHold",
"InsertLeave",
}, {
group = require("config.util").augroup("barbecue.updater"),
callback = function()
require("barbecue.ui").update()
end,
})
local navic = require("nvim-navic")
vim.api.nvim_create_autocmd("LspAttach", {
desc = "Navic Attacher",
group = require("config.util").augroup("barbecue.navic"),
callback = function(a)
if not a.data then
return
end
local client = vim.lsp.get_client_by_id(a.data.client_id)
if client.server_capabilities["documentSymbolProvider"] then
navic.attach(client, a.buf)
end
end,
})
end,
event = { "LspAttach" },
enabled = require("config.util").is_enabled("utilyre/barbecue.nvim"),
}