@@ -343,14 +343,14 @@ if a third argument (the value) is provided.
343343
344344(defvar clojure-ts--treesit-range-settings
345345 (treesit-range-rules
346- :embed 'markdown_inline
346+ :embed 'markdown-inline
347347 :host 'clojure
348348 (clojure-ts--docstring-query '@capture )))
349349
350350(defun clojure-ts--font-lock-settings (markdown-available )
351351 " Return font lock settings suitable for use in `treesit-font-lock-settings' .
352352When MARKDOWN-AVAILABLE is non-nil, includes rules for highlighting docstrings
353- with the markdown_inline grammar."
353+ with the markdown-inline grammar."
354354 (append
355355 (treesit-font-lock-rules
356356 :feature 'string
@@ -512,11 +512,9 @@ with the markdown_inline grammar."
512512 (when markdown-available
513513 (treesit-font-lock-rules
514514 :feature 'doc
515- :language 'markdown_inline
515+ :language 'markdown-inline
516516 :override t
517- `((inline
518- (code_span (code_span_delimiter) :* @font-lock-delimiter-face)
519- @font-lock-constant-face))))
517+ `((code_span) @font-lock-constant-face)))
520518
521519 (treesit-font-lock-rules
522520 :feature 'quote
@@ -1296,9 +1294,9 @@ If JUSTIFY is non-nil, justify as well as fill the paragraph."
12961294
12971295(defconst clojure-ts-grammar-recipes
12981296 '((clojure " https://github.com/sogaiu/tree-sitter-clojure.git"
1299- " v0.0.12 " )
1300- (markdown_inline " https://github.com/MDeiml/tree-sitter-markdown"
1301- " v0.1.6 "
1297+ " v0.0.13 " )
1298+ (markdown-inline " https://github.com/MDeiml/tree-sitter-markdown"
1299+ " v0.4.1 "
13021300 " tree-sitter-markdown-inline/src" ))
13031301 " Intended to be used as the value for `treesit-language-source-alist' ." )
13041302
@@ -1316,6 +1314,18 @@ If JUSTIFY is non-nil, justify as well as fill the paragraph."
13161314 (let ((treesit-language-source-alist clojure-ts-grammar-recipes))
13171315 (treesit-install-language-grammar grammar)))))))
13181316
1317+ (defun clojure-ts-reinstall-grammars ()
1318+ " Installs the required versions of language grammars.
1319+
1320+ If the grammars are already installed, they will be reinstalled. This
1321+ function can also be used to upgrade the grammars if they are outdated."
1322+ (interactive )
1323+ (dolist (recipe clojure-ts-grammar-recipes)
1324+ (let ((grammar (car recipe)))
1325+ (message " Installing %s tree-sitter grammar " grammar)
1326+ (let ((treesit-language-source-alist clojure-ts-grammar-recipes))
1327+ (treesit-install-language-grammar grammar)))))
1328+
13191329(defun clojure-ts-mode-variables (&optional markdown-available )
13201330 " Initialize buffer-local variables for `clojure-ts-mode' .
13211331See `clojure-ts--font-lock-settings' for usage of MARKDOWN-AVAILABLE."
@@ -1361,9 +1371,9 @@ See `clojure-ts--font-lock-settings' for usage of MARKDOWN-AVAILABLE."
13611371 :syntax-table clojure-ts-mode-syntax-table
13621372 (clojure-ts--ensure-grammars)
13631373 (let ((use-markdown-inline (and clojure-ts-use-markdown-inline
1364- (treesit-ready-p 'markdown_inline t ))))
1374+ (treesit-ready-p 'markdown-inline t ))))
13651375 (when use-markdown-inline
1366- (treesit-parser-create 'markdown_inline )
1376+ (treesit-parser-create 'markdown-inline )
13671377 (setq-local treesit-range-settings clojure-ts--treesit-range-settings))
13681378
13691379 (when (treesit-ready-p 'clojure )
0 commit comments