37 lines
1.7 KiB
Fennel
37 lines
1.7 KiB
Fennel
(module config.plugin.treesitter
|
|
{autoload {nvim aniseed.nvim}})
|
|
|
|
(let [(ok? ts) (pcall require :nvim-treesitter.configs)]
|
|
(when ok?
|
|
(ts.setup
|
|
{:highlight {:enable true :additional_vim_regex_highlighting false}
|
|
:rainbow {:enable true
|
|
:extended_mode true
|
|
:max_files_lines nil}
|
|
:incremental_selection {
|
|
:enable true
|
|
:keymaps {
|
|
:init_selection "<Leader>s"
|
|
:node_incremental "u"
|
|
:scope_incremental "s"
|
|
:node_decremental "d"
|
|
}
|
|
}
|
|
:refactor {
|
|
:highlight_definitions {:enable true}
|
|
:smart_rename {
|
|
:enable true
|
|
:keymaps {
|
|
:smart_rename "<Leader>r"
|
|
}
|
|
}
|
|
}
|
|
:navigation {
|
|
:enable true
|
|
:keymaps {:goto_definition "<Leader>tg"
|
|
:list_definition "<Leader>ta"}
|
|
}
|
|
:ensure_installed [:python :yaml :rust :fennel :lua]})
|
|
(set nvim.o.foldmethod "expr")
|
|
(set nvim.o.foldexpr "nvim_treesitter#foldexpr()")
|
|
))
|