summaryrefslogtreecommitdiff
path: root/fnl/plugins/treesitter.fnl
blob: 1d96a13e9be7a4521103e51ad9e6af7386244df7 (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
;; Treesitter is a tool for building syntax trees for source files.
;; In the neovim context it helps with better coloring.

(local opts {:ensure_installed [:c
                                :rust
                                :lua
                                :hcl
                                :org
                                :haskell
                                :python
                                :fennel
                                :make
                                :go
                                :ocaml
                                :erlang
                                :vim
                                :yaml
                                :html
                                :toml
                                :dockerfile
                                :markdown
                                :latex]
             :sync_install false
             :ignore_install [""]
             :autopairs {:enable true}
             :highlight {:enable true :disable [:org]}
             :context_commentstring {:enable true :enable_autocmd false}
             :indent {:enable true :disable [:yaml :python :css]}
             :playground {:enable true}})

(fn setup []
  (let [treesitter (require :nvim-treesitter.configs)]
    (treesitter.setup opts)))

{1 :nvim-treesitter/nvim-treesitter
 :build ":TSUpdate"
 :event :BufReadPost
 :config (fn []
           (setup))}