]>
git.eshelyaron.com Git - emacs.git/commit
Add tree-sitter functionality to js-mode
The diff for js-mode, js-json-mode, js-jsx-mode are a bit strange, but
all we did is to wrap some the old code in
(if tree-sitter
(tree-sitter-enable)
...some old-code)
...other old-code (that’s tree-sitter-agnostic)
* lisp/progmodes/js.el (treesit): Add tree-sitter dependency
(js-use-treesitter)
(js-json-use-treesitter): New custom options.
(js--treesit-keywords)
(js--treesit-settings)
(js--treesit-indent-rules)
(js--json-treesit-settings)
(js--json-treesit-indent-rules): New variables.
(js--treesit-backward-up-list)
(js-treesit-current-defun)
(js--treesit-move-to-node)
(js--treesit-beginning-of-defun, js--treesit-end-of-defun)
(js--treesit-enable)
(js--json-treesit-enable): New functions.
(js-mode, js-json-mode, js-jsx-mode): Add support for tree-sitter
functionalities.