You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`clojure-ts-mode` makes use of two TreeSitter grammars to work properly:
154
+
155
+
- The Clojure grammar, mentioned earlier
156
+
-[markdown_inline](https://github.com/MDeiml/tree-sitter-markdown), which
157
+
will be used for docstrings if available and if `clojure-ts-use-markdown-inline` is enabled.
157
158
158
159
If you have `git` and a C compiler (`cc`) available on your system's `PATH`,
159
-
**then these steps should not be necessary**. clojure-ts-mode will install the
160
+
`clojure-ts-mode` will install the
160
161
grammars when you first open a Clojure file and `clojure-ts-ensure-grammars` is
161
162
set to `t` (the default).
162
163
163
-
If clojure-ts-mode fails to automatically install the grammar, you have the option to install it manually.
164
-
165
-
#### From your OS
166
-
167
-
Some distributions may package the tree-sitter-clojure grammar in their package repositories.
168
-
If yours does you may be able to install tree-sitter-clojure with your system package manager.
169
-
170
-
If the version packaged by your OS is out of date, you may see errors in the `*Messages*` buffer or your clojure buffers will not have any syntax highlighting.
171
-
172
-
If this happens you should install the grammar manually with `M-x treesit-install-language-grammar <RET> clojure` and follow the prompts.
173
-
Recommended values for these prompts can be seen in `clojure-ts-grammar-recipes`.
174
-
175
-
#### Compile From Source
176
-
177
-
If all else fails, you can attempt to download and compile manually.
178
-
All you need is `git` and a C compiler (GCC works well).
179
-
180
-
To start, clone [tree-sitter-clojure](https://github.com/sogaiu/tree-sitter-clojure).
181
-
182
-
Then run the following code (depending on your OS) from the tree-sitter-clojure repository on your machine.
183
-
184
-
#### Linux
185
-
186
-
```bash
187
-
mkdir -p dist
188
-
cc -c -I./src src/parser.c -o "parser.o"
189
-
cc -fPIC -shared src/parser.o -o "dist/libtree-sitter-clojure.so"
190
-
```
191
-
192
-
#### macOS
193
-
194
-
```bash
195
-
mkdir -p dist
196
-
cc -c -I./src src/parser.c -o "parser.o"
197
-
cc -fPIC -shared src/parser.o -o "dist/libtree-sitter-clojure.dylib"
198
-
```
199
-
200
-
#### Windows
201
-
202
-
I don't know how to do this on Windows. Patches welcome!
203
-
204
-
#### Finally, in emacs
205
-
206
-
Then tell Emacs where to find the shared library by adding something like this to your init file:
0 commit comments