about summary refs log tree commit diff
path: root/fnl/nvrc/packs/treesitter.fnl
blob: d43f97a91ed8d707ca29e76d5545843b10aac269 (plain)
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
(local {: setup} (require :nvim-treesitter.configs))

(local colors (require :nvrc.colors))

(setup {:ensure_installed [:fennel :lua :nix]
        :highlight {:enable true}
        :indent {:enable true}
        :refactor {:highlight_definitions {:enable true}
                   :highlight_current_scope {:enable false}
                   :smart_rename {:enable true
                                  :keymaps {:smart_rename :<localleader>rn}}
                   :navigation {:enable true
                                :keymaps {:goto_definition :<localleader>gd
                                          :list_definitions :<localleader>ld
                                          :list_definitions_toc :<localleader>td
                                          :goto_next_usage :<a-*>
                                          :goto_previous_usage "<a-#>"}}}
        :textobjects {:select {:enable true
                               :lookahead true
                               :keymaps {:if "@function.inner"
                                         :af "@function.outer"
                                         :ic "@class.inner"
                                         :ac "@class.outer"
                                         :ia "@parameter.inner"
                                         :aa "@parameter.outer"}}
                      :swap {:enable true
                             :swap_next {:<localleader>> "@parameter.inner"}
                             :swap_previous {:<localleader>< "@parameter.inner"}}}
        :matchup {:enable true}})