Skip to content

Commit cf2980a

Browse files
committed
Add a section to README.md on updating the grammar manually
Change-Id: I9c55a11dd9589a3789c4b0e37f290fd0b40861d4
1 parent a62c1d6 commit cf2980a

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,19 @@ Julia tree-sitter grammar will be automatically downloaded and compiled when a
4444
Julia file is opened using the major mode `julia-ts-mode`. For more information
4545
on how to install and configure `treesit-auto`, check the package documentation.
4646

47+
### Upgrading grammar after a package update
48+
49+
Note that the [tree-sitter grammar for
50+
Julia](https://github.com/tree-sitter/tree-sitter-julia) is under active
51+
development, and breaking changes are often introduced between versions. To
52+
provide maximum compatibility, the exact version of the grammar library is fixed
53+
in `julia-ts-mode.el`, with planned regular updates to both the grammar version
54+
and the tree-sitter queries built on top of it. However, the grammar library
55+
itself isn't updated automatically by Emacs. If, after a `julia-ts-mode` package
56+
update, you get some quirky tree-sitter error messages, and font-locking fails
57+
to work in a `julia-ts-mode` buffer, run `M-x treesit-install-language-grammar
58+
RET julia RET` to upgrade the grammar library. This should resolve the issues.
59+
4760
# LSP Configuration
4861

4962
This mode is derived from `julia-mode`. Hence, most of the feature available for

0 commit comments

Comments
 (0)