1
0
Fork 0
dotfiles/home/config/nvim/nifoc/treesitter.fnl
Daniel Kempkens 611a189ab0
Some checks failed
Build / build-arm64-linux (push) Failing after 1s
Build / build-amd64-linux (push) Successful in 2m36s
nvim: switch from cmp to blink.cmp
2024-12-27 01:47:43 +01:00

20 lines
1,004 B
Fennel

(let [mod {}
(ok treesitter) (pcall require :nvim-treesitter)
set-bufvar vim.api.nvim_buf_set_var]
(fn mod.setup []
(if ok
(treesitter.define_modules {:nifoc_hooks {:enable false
:attach (lambda [bufnr]
(set-bufvar bufnr
:nifoc_treesitter_enabled
1))
:detach (lambda [bufnr]
(set-bufvar bufnr
:nifoc_treesitter_enabled
0))
:is_supported #true}})))
(fn mod.active? []
(= vim.b.nifoc_treesitter_enabled 1))
mod)