Tree-sitter modes should use the same syntax table as the
non-tree-sitter ones.
* lisp/progmodes/js.el (js-mode-syntax-table)
(js-ts-mode)
* lisp/progmodes/python.el (python-ts-mode)
* lisp/progmodes/sh-script.el (bash-ts-mode)
Copyright-paperwork-exempt: yes
xx
(modify-syntax-entry ?$ "_" table)
(modify-syntax-entry ?` "\"" table)
table)
- "Syntax table for `js-mode'.")
+ "Syntax table for `js-mode' and `js-ts-mode'.")
(defvar-local js--quick-match-re nil
"Autogenerated regexp used by `js-mode' to match buffer constructs.")
\\<js-ts-mode-map>"
:group 'js
+ :syntax-table js-mode-syntax-table
(when (treesit-ready-p 'javascript)
;; Borrowed from `js-mode'.
(setq-local prettify-symbols-alist js--prettify-symbols-alist)
"Major mode for editing Python files, using tree-sitter library.
\\{python-ts-mode-map}"
+ :syntax-table python-mode-syntax-table
(when (treesit-ready-p 'python)
(treesit-parser-create 'python)
(setq-local treesit-font-lock-feature-list
"Major mode for editing Bash shell scripts.
This mode automatically falls back to `sh-mode' if the buffer is
not written in Bash or sh."
+ :syntax-table sh-mode-syntax-table
(when (treesit-ready-p 'bash)
(setq-local treesit-font-lock-feature-list
'(( comment function)