summaryrefslogtreecommitdiff
path: root/fnl/plugins/editor/treesitter.fnl
diff options
context:
space:
mode:
Diffstat (limited to 'fnl/plugins/editor/treesitter.fnl')
-rw-r--r--fnl/plugins/editor/treesitter.fnl39
1 files changed, 39 insertions, 0 deletions
diff --git a/fnl/plugins/editor/treesitter.fnl b/fnl/plugins/editor/treesitter.fnl
new file mode 100644
index 0000000..1d96a13
--- /dev/null
+++ b/fnl/plugins/editor/treesitter.fnl
@@ -0,0 +1,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))}