Skip to content

Commit 456a7ca

Browse files
rrudakovbbatsov
authored andcommitted
Switch to the experimental Clojure grammar
1 parent b7f9950 commit 456a7ca

File tree

4 files changed

+200
-194
lines changed

4 files changed

+200
-194
lines changed

README.md

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,15 @@ Once installed, evaluate `clojure-ts-mode.el` and you should be ready to go.
123123
> `clojure-ts-mode` install the required grammars automatically, so for most
124124
> people no manual actions will be required.
125125
126-
`clojure-ts-mode` makes use of two Tree-sitter grammars to work properly:
126+
`clojure-ts-mode` makes use of the following Tree-sitter grammars:
127127

128-
- The Clojure grammar, mentioned earlier
129-
- [markdown-inline](https://github.com/MDeiml/tree-sitter-markdown), which
130-
will be used for docstrings if available and if `clojure-ts-use-markdown-inline` is enabled.
128+
- The [experimental](https://github.com/sogaiu/tree-sitter-clojure/tree/unstable-20250526) version Clojure grammar. This version includes a few
129+
improvements, which potentially will be promoted to a stable release (See [the
130+
discussion](https://github.com/sogaiu/tree-sitter-clojure/issues/65)). This grammar is required for proper work of `clojure-ts-mode`.
131+
- [markdown-inline](https://github.com/MDeiml/tree-sitter-markdown), which will be used for docstrings if available and if
132+
`clojure-ts-use-markdown-inline` is enabled.
133+
- [tree-sitter-regex](https://github.com/tree-sitter/tree-sitter-regex/releases/tag/v0.24.3), which will be used for regex literals if available and if
134+
`clojure-ts-use-regex-parser` is not `nil`.
131135

132136
If you have `git` and a C compiler (`cc`) available on your system's `PATH`,
133137
`clojure-ts-mode` will install the
@@ -136,8 +140,14 @@ set to `t` (the default).
136140

137141
If `clojure-ts-mode` fails to automatically install the grammar, you have the
138142
option to install it manually, Please, refer to the installation instructions of
139-
each required grammar and make sure you're install the versions expected. (see
140-
`clojure-ts-grammar-recipes` for details)
143+
each required grammar and make sure you're install the versions expected (see
144+
`clojure-ts-grammar-recipes` for details).
145+
146+
If `clojure-ts-ensure-grammars` is enabled, `clojure-ts-mode` will try to upgrade
147+
the Clojure grammar if it's outdated. This might happen, when you activate
148+
`clojure-ts-mode` for the first time after package update. If grammar was
149+
previously installed, you might need to restart Emacs, because it has to reload
150+
the grammar binary.
141151

142152
### Upgrading Tree-sitter grammars
143153

0 commit comments

Comments
 (0)