@@ -983,8 +983,15 @@ If JUSTIFY is non-nil, justify as well as fill the paragraph."
983
983
See `clojure-ts--font-lock-settings' for usage of MARKDOWN-AVAILABLE."
984
984
(setq-local comment-add 1 )
985
985
(setq-local comment-start " ;" )
986
+
986
987
(setq-local treesit-font-lock-settings
987
988
(clojure-ts--font-lock-settings markdown-available))
989
+ (setq-local treesit-font-lock-feature-list
990
+ '((comment definition variable)
991
+ (keyword string char symbol builtin type)
992
+ (constant number quote metadata doc)
993
+ (bracket deref function regex tagged-literals)))
994
+
988
995
(setq-local treesit-defun-prefer-top-level t )
989
996
(setq-local treesit-defun-tactic 'top-level )
990
997
(setq-local treesit-defun-type-regexp
@@ -995,18 +1002,16 @@ See `clojure-ts--font-lock-settings' for usage of MARKDOWN-AVAILABLE."
995
1002
(lambda (node )
996
1003
(or (not clojure-ts-toplevel-inside-comment-form)
997
1004
(not (clojure-ts--definition-node-p " comment" node))))))
998
- (setq-local treesit-simple-indent-rules
999
- (clojure-ts--configured-indent-rules))
1000
1005
(setq-local treesit-defun-name-function
1001
1006
#'clojure-ts--standard-definition-node-name )
1007
+
1008
+ (setq-local treesit-simple-indent-rules
1009
+ (clojure-ts--configured-indent-rules))
1010
+ (setq-local fill-paragraph-function #'clojure-ts--fill-paragraph )
1011
+
1002
1012
(setq-local treesit-simple-imenu-settings
1003
1013
clojure-ts--imenu-settings)
1004
- (setq-local treesit-font-lock-feature-list
1005
- '((comment definition variable)
1006
- (keyword string char symbol builtin type)
1007
- (constant number quote metadata doc)
1008
- (bracket deref function regex tagged-literals)))
1009
- (setq-local fill-paragraph-function #'clojure-ts--fill-paragraph )
1014
+
1010
1015
(when (boundp 'treesit-thing-settings ) ; ; Emacs 30+
1011
1016
(setq-local treesit-thing-settings clojure-ts--thing-settings)))
1012
1017
@@ -1022,15 +1027,19 @@ See `clojure-ts--font-lock-settings' for usage of MARKDOWN-AVAILABLE."
1022
1027
(when use-markdown-inline
1023
1028
(treesit-parser-create 'markdown_inline )
1024
1029
(setq-local treesit-range-settings clojure-ts--treesit-range-settings))
1030
+
1025
1031
(when (treesit-ready-p 'clojure )
1026
1032
(treesit-parser-create 'clojure )
1027
1033
(clojure-ts-mode-variables use-markdown-inline)
1034
+
1028
1035
(when clojure-ts--debug
1029
1036
(setq-local treesit--indent-verbose t )
1030
1037
(when (eq clojure-ts--debug 'font-lock )
1031
1038
(setq-local treesit--font-lock-verbose t ))
1032
1039
(treesit-inspect-mode))
1040
+
1033
1041
(treesit-major-mode-setup)
1042
+
1034
1043
; ; Workaround for treesit-transpose-sexps not correctly working with
1035
1044
; ; treesit-thing-settings on Emacs 30.
1036
1045
; ; Once treesit-transpose-sexps it working again this can be removed
0 commit comments