1
0
Fork 0
dotfiles/home/config/nvim/nifoc/treesitter.fnl

20 lines
942 B
Fennel

(let [mod {}
treesitter (require :nvim-treesitter)
set-bufvar vim.api.nvim_buf_set_var]
(fn mod.setup []
(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)