blob: c8b3772c70e77773de3fcd76e0d1df0407ac25cf (
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
;; Treesitter is a tool for building syntax trees for source files.
;; In the neovim context it helps with better coloring.
(local opts
{:ensure_installed [:bash
:c
:comment
:dockerfile
:elixir
:fennel
:graphql
:haskell
:hcl
:html
:http
:json
:latex
:lua
:make
:markdown
:ocaml
:python
:rust
:sql
:toml
:vim
:vimdoc
:xml
:yaml]
:sync_install false
:ignore_install [""]
:autopairs {:enable true}
:highlight {:enable true :additional_vim_regex_highlighting [:org]}
:context_commentstring {:enable true :enable_autocmd false}
:indent {:enable true :disable [:yaml :python :css]}
:playground {:enable true}
:textobjects {:select {:enable true
:lookahead true
:keymaps {:aa "@parameter.outer"
:ia "@parameter.inner"
:af "@function.outer"
:if "@function.inner"
:ii "@conditional.outer"
:ai "@conditional.inner"
:il "@loop.outer"
:al "@loop.inner"
:ac "@class.outer"
:at "@comment.outer"
:ic {:query "@class.inner"
:desc "Select inner part of a class region"}
:as {:query "@scope"
:query_group :locals
:desc "Select language scope"}}
:selection_modes {"@parameter.outer" :v
"@function.outer" :V
"@class.outer" :<c-v>}
:include_surrounding_whitespace true}
:swap {:enable true
:swap_next {:<leader>a "@parameter.inner"}
:swap_previous {:<leader>A "@parameter.inner"}}
:move {:enable true
:set_jumps true
:goto_next_start {"]m" "@function.outer"
"]]" {:query "@class.outer"
:desc "Next class start"}
"]o" "@loop.*"
"]s" {:query "@scope"
:query_group :locals
:desc "Next scope"}
"]z" {:query "@fold"
:query_group :folds
:desc "Next fold"}}
:goto_next_end {"]M" "@function.outer"
"][" "@class.outer"}
:goto_previous_start {"[m" "@function.outer"
"[[" "@class.outer"}
:goto_previous_end {"[M" "@function.outer"
"[]" "@class.outer"}
:goto_next {"]i" "@conditional.outer"}
:goto_previous {"[i" "@conditional.outer"}}
:lsp_interop {:enable true
:border :single
:floating_preview_opts {}
:peek_definition_code {:md "@function.outer"
:mD "@class.outer"}}}})
(λ config []
(let [treesitter (require :nvim-treesitter.configs)]
(treesitter.setup opts)))
{1 :nvim-treesitter/nvim-treesitter
:dependencies [{1 :nvim-treesitter/nvim-treesitter-textobjects :lazy true}]
:build ":TSUpdate"
:event [:VeryLazy]
: config}
|