;;(syntax-propertize (point-max))
)
-(defvar js--treesit-sentence-type-regexp
+(defvar js--treesit-sentence-nodes
'("import_statement"
"debugger_statement"
"expression_statement"
(setq-local treesit-defun-name-function #'js--treesit-defun-name)
(setq-local treesit-sentence-type-regexp
- (regexp-opt js--treesit-sentence-type-regexp))
+ (regexp-opt js--treesit-sentence-nodes))
;; Fontification.
(setq-local treesit-font-lock-settings js--treesit-font-lock-settings)
:override t
'((escape_sequence) @font-lock-escape-face)))
-(defvar typescript-ts-mode--sentence-type-regexp
+(defvar typescript-ts-mode--sentence-nodes
'("import_statement"
"debugger_statement"
"expression_statement"
(setq-local treesit-defun-name-function #'js--treesit-defun-name)
(setq-local treesit-sentence-type-regexp
- (regexp-opt typescript-ts-mode--sentence-type-regexp))
+ (regexp-opt typescript-ts-mode--sentence-nodes))
;; Imenu (same as in `js-ts-mode').
(setq-local treesit-simple-imenu-settings
;; Navigation
(setq-local treesit-sentence-type-regexp
(regexp-opt (append
- typescript-ts-mode--sentence-type-regexp
+ typescript-ts-mode--sentence-nodes
'("jsx_element"
"jsx_self_closing_element"))))