about summary refs log tree commit diff
path: root/fnl/nvrc/packs/treesitter.fnl
blob: befcbc92eb1a42faf3250d4d16f4d1da2821a1a4 (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
30
31
32
33
34
35
36
37
38
39
(local {: setup} (require :nvim-treesitter.configs))

(local colors (require :nvrc.colors))

(setup {:ensure_installed [:fennel :lua :nix]
        :highlight {:enable true}
        :context_commentstring {:enable true
                                :config {:fennel "; %s"}}
        :rainbow {:enable true
                  :extended_mode true
                  :max_file_lines 2000
                  :disable ["c" "cpp"]
                  :colors [
                           (. colors :skyblue)
                           (. colors :blue)
                           (. colors :violet)
                           (. colors :magenta)]}
        :indent {:enable true}
        :refactor {:highlight_definitions {:enable true}
                   :highlight_current_scope {:enable false}
                   :smart_rename {:enable true
                                  :keymaps {:smart_rename :grr}}
                   :navigation {:enable true
                                :keymaps {:goto_definition :gnd
                                          :list_definitions :gnD
                                          :goto_next_usage :<M-2>
                                          :goto_previous_usage :<M-1>}}}
        :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}})