summaryrefslogtreecommitdiff
path: root/emacs
diff options
context:
space:
mode:
authorGravatar Uko Kokņevičs2025-10-27 11:24:53 +0200
committerGravatar Uko Kokņevičs2025-10-27 11:24:53 +0200
commit41f369ce26b5918282dbfda79e1cb25be6e15412 (patch)
treeba672a64db67b1fb874006421f39668ae29080c2 /emacs
parentemacs: replace lua-mode with lua-ts-mode (diff)
downloaddotfiles-41f369ce26b5918282dbfda79e1cb25be6e15412.tar.gz
dotfiles-41f369ce26b5918282dbfda79e1cb25be6e15412.tar.xz
dotfiles-41f369ce26b5918282dbfda79e1cb25be6e15412.zip
emacs: Make both treesit ABI 13 & 14 required
Diffstat (limited to 'emacs')
-rw-r--r--emacs/.config/emacs/arkta/arkta-progmodes.el1
-rw-r--r--emacs/.config/emacs/arkta/arkta-treesit.el62
2 files changed, 22 insertions, 41 deletions
diff --git a/emacs/.config/emacs/arkta/arkta-progmodes.el b/emacs/.config/emacs/arkta/arkta-progmodes.el
index 8fa7624..78da860 100644
--- a/emacs/.config/emacs/arkta/arkta-progmodes.el
+++ b/emacs/.config/emacs/arkta/arkta-progmodes.el
@@ -299,7 +299,6 @@
299 299
300(use-package typst-ts-mode 300(use-package typst-ts-mode
301 :after treesit 301 :after treesit
302 :when (arkta/treesit-supports 14)
303 :straight t 302 :straight t
304 :mode "\\.typ\\'") 303 :mode "\\.typ\\'")
305 304
diff --git a/emacs/.config/emacs/arkta/arkta-treesit.el b/emacs/.config/emacs/arkta/arkta-treesit.el
index 2a33d8f..7fc19f8 100644
--- a/emacs/.config/emacs/arkta/arkta-treesit.el
+++ b/emacs/.config/emacs/arkta/arkta-treesit.el
@@ -14,8 +14,8 @@
14 (defun arkta/treesit-supports (&rest wanted-versions) 14 (defun arkta/treesit-supports (&rest wanted-versions)
15 (-any? #'arkta/treesit-supports-single wanted-versions)) 15 (-any? #'arkta/treesit-supports-single wanted-versions))
16 16
17 (unless (arkta/treesit-supports 13) 17 (unless (arkta/treesit-supports 13 14)
18 (error "Your treesitter library does not support ABI version 13!")) 18 (error "Your treesitter library does not support ABI versions 13 & 14!"))
19 19
20 (defmacro arkta/treesit-cond (&rest body) 20 (defmacro arkta/treesit-cond (&rest body)
21 (declare (indent 0)) 21 (declare (indent 0))
@@ -92,89 +92,73 @@
92 `((c "https://github.com/tree-sitter/tree-sitter-c.git" 92 `((c "https://github.com/tree-sitter/tree-sitter-c.git"
93 ,(arkta/treesit-cond 93 ,(arkta/treesit-cond
94 (15 "v0.24.1") 94 (15 "v0.24.1")
95 (14 "v0.23.6") 95 (14 "v0.23.6")))
96 (13 "v0.19.0")))
97 96
98 (cmake "https://github.com/uyha/tree-sitter-cmake.git" 97 (cmake "https://github.com/uyha/tree-sitter-cmake.git"
99 ,(arkta/treesit-cond 98 ,(arkta/treesit-cond
100 (14 "v0.7.2") 99 (14 "v0.7.2")))
101 (13 "0.1.0")))
102 100
103 (cpp "https://github.com/tree-sitter/tree-sitter-cpp.git" 101 (cpp "https://github.com/tree-sitter/tree-sitter-cpp.git"
104 ,(arkta/treesit-cond 102 ,(arkta/treesit-cond
105 (14 "v0.23.4") 103 (14 "v0.23.4")))
106 (13 "v0.19.0")))
107 104
108 (c-sharp "https://github.com/tree-sitter/tree-sitter-c-sharp.git" 105 (c-sharp "https://github.com/tree-sitter/tree-sitter-c-sharp.git"
109 ,(arkta/treesit-cond 106 ,(arkta/treesit-cond
110 (14 "v0.23.1") 107 (14 "v0.23.1")))
111 (13 "v0.20.0")))
112 108
113 (css "https://github.com/tree-sitter/tree-sitter-css.git" 109 (css "https://github.com/tree-sitter/tree-sitter-css.git"
114 ,(arkta/treesit-cond 110 ,(arkta/treesit-cond
115 (15 "v0.25.0") 111 (15 "v0.25.0")
116 (14 "v0.23.2") 112 (14 "v0.23.2")))
117 (13 "v0.19.0")))
118 113
119 (dockerfile "https://github.com/camdencheek/tree-sitter-dockerfile.git" 114 (dockerfile "https://github.com/camdencheek/tree-sitter-dockerfile.git"
120 ,(arkta/treesit-cond 115 ,(arkta/treesit-cond
121 (14 "v0.2.0") 116 (14 "v0.2.0")))
122 (13 "v0.1.2")))
123 117
124 (go "https://github.com/tree-sitter/tree-sitter-go.git" 118 (go "https://github.com/tree-sitter/tree-sitter-go.git"
125 ,(arkta/treesit-cond 119 ,(arkta/treesit-cond
126 (15 "v0.25.0") 120 (15 "v0.25.0")
127 (14 "v0.23.4") 121 (14 "v0.23.4")))
128 (13 "v0.19.1")))
129 122
130 (gomod "https://github.com/camdencheek/tree-sitter-go-mod.git" 123 (gomod "https://github.com/camdencheek/tree-sitter-go-mod.git"
131 ,(arkta/treesit-cond 124 ,(arkta/treesit-cond
132 (14 "v1.1.0") 125 (14 "v1.1.0")))
133 (13 "v1.0.0")))
134 126
135 (java "https://github.com/tree-sitter/tree-sitter-java.git" 127 (java "https://github.com/tree-sitter/tree-sitter-java.git"
136 ,(arkta/treesit-cond 128 ,(arkta/treesit-cond
137 (14 "v0.23.5") 129 (14 "v0.23.5")))
138 (13 "v0.19.1")))
139 130
140 (javascript "https://github.com/tree-sitter/tree-sitter-javascript.git" 131 (javascript "https://github.com/tree-sitter/tree-sitter-javascript.git"
141 ,(arkta/treesit-cond 132 ,(arkta/treesit-cond
142 (15 "v0.25.0") 133 (15 "v0.25.0")
143 (14 "v0.23.1") 134 (14 "v0.23.1")))
144 (13 "v0.19.0")))
145 135
146 (json "https://github.com/tree-sitter/tree-sitter-json.git" 136 (json "https://github.com/tree-sitter/tree-sitter-json.git"
147 ,(arkta/treesit-cond 137 ,(arkta/treesit-cond
148 (14 "v0.24.8") 138 (14 "v0.24.8")))
149 (13 "v0.19.0")))
150 139
151 (kotlin "https://github.com/fwcd/tree-sitter-kotlin.git" 140 (kotlin "https://github.com/fwcd/tree-sitter-kotlin.git"
152 ,(arkta/treesit-cond 141 ,(arkta/treesit-cond
153 (14 "0.3.8") 142 (14 "0.3.8")))
154 (13 "0.2.11")))
155 143
156 (lua "https://github.com/tree-sitter-grammars/tree-sitter-lua" 144 (lua "https://github.com/tree-sitter-grammars/tree-sitter-lua"
157 ,(arkta/treesit-cond 145 ,(arkta/treesit-cond
158 (15 "v0.4.0") 146 (15 "v0.4.0")
159 (14 "v0.3.0") 147 (14 "v0.3.0")))
160 (13 "v0.0.15")))
161 148
162 (python "https://github.com/tree-sitter/tree-sitter-python.git" 149 (python "https://github.com/tree-sitter/tree-sitter-python.git"
163 ,(arkta/treesit-cond 150 ,(arkta/treesit-cond
164 (15 "v0.25.0") 151 (15 "v0.25.0")
165 (14 "v0.23.6") 152 (14 "v0.23.6")))
166 (13 "v0.19.0")))
167 153
168 (ruby "https://github.com/tree-sitter/tree-sitter-ruby.git" 154 (ruby "https://github.com/tree-sitter/tree-sitter-ruby.git"
169 ,(arkta/treesit-cond 155 ,(arkta/treesit-cond
170 (14 "v0.23.1") 156 (14 "v0.23.1")))
171 (13 "v0.19.0")))
172 157
173 (rust "https://github.com/tree-sitter/tree-sitter-rust.git" 158 (rust "https://github.com/tree-sitter/tree-sitter-rust.git"
174 ,(arkta/treesit-cond 159 ,(arkta/treesit-cond
175 (15 "v0.24.0") 160 (15 "v0.24.0")
176 (14 "v0.23.3") 161 (14 "v0.23.3")))
177 (13 "v0.19.1")))
178 162
179 (toml "https://github.com/ikatyang/tree-sitter-toml.git" 163 (toml "https://github.com/ikatyang/tree-sitter-toml.git"
180 ,(arkta/treesit-cond 164 ,(arkta/treesit-cond
@@ -182,8 +166,7 @@
182 166
183 (tsx "https://github.com/tree-sitter/tree-sitter-typescript.git" 167 (tsx "https://github.com/tree-sitter/tree-sitter-typescript.git"
184 ,(arkta/treesit-cond 168 ,(arkta/treesit-cond
185 (14 "v0.23.2") 169 (14 "v0.23.2"))
186 (13 "v0.19.0"))
187 "tsx/src") 170 "tsx/src")
188 (typescript "https://github.com/tree-sitter/tree-sitter-typescript.git" 171 (typescript "https://github.com/tree-sitter/tree-sitter-typescript.git"
189 ,(arkta/treesit-cond 172 ,(arkta/treesit-cond
@@ -195,10 +178,9 @@
195 ,(arkta/treesit-cond 178 ,(arkta/treesit-cond
196 (13 "v0.5.0"))) 179 (13 "v0.5.0")))
197 180
198 ,@(when (arkta/treesit-supports 14) 181 (typst "https://github.com/uben0/tree-sitter-typst.git"
199 `((typst "https://github.com/uben0/tree-sitter-typst.git" 182 ,(arkta/treesit-cond
200 ,(arkta/treesit-cond 183 (14 "v0.11.0")))))
201 (14 "v0.11.0")))))))
202 184
203 (arkta/treesit-ensure-languages)) 185 (arkta/treesit-ensure-languages))
204 186