* lisp/textmodes/mhtml-ts-mode.el:
* lisp/progmodes/php-ts-mode.el:
Use 'add-to-list' on items in language-source-alist
that should check for duplicate items.
* test/infra/Dockerfile.emba: Move multi-language mhtml-ts-mode and
php-ts-mode to the end to give their dependent grammars a lower priority.
* test/lisp/progmodes/js-tests.el (js-ts-mode-test-indentation):
Skip the test when 'jsdoc' is missing since 'js-ts-mode' depends
on the 'jsdoc' grammar.
(cherry picked from commit
5684a3808677fb701833c83325cd3bc8de475561)
You can customize `treesit-language-source-alist' if you want
to stick to a specific commit and/or use different parsers.")
-(setq treesit-language-source-alist
- (append treesit-language-source-alist
- php-ts-mode--language-source-alist))
+(dolist (item php-ts-mode--language-source-alist)
+ (add-to-list 'treesit-language-source-alist item t))
(defun php-ts-mode-install-parsers ()
"Install all the required treesitter parsers.
You can customize `treesit-language-source-alist' if you want
to stick to a specific commit and/or use different parsers.")
-(setq treesit-language-source-alist
- (append treesit-language-source-alist
- mhtml-ts-mode--language-source-alist))
+(dolist (item mhtml-ts-mode--language-source-alist)
+ (add-to-list 'treesit-language-source-alist item t))
(defun mhtml-ts-mode-install-parsers ()
"Install all the required treesitter parsers.
(treesit-library-abi-version t) (treesit-library-abi-version))' \
--eval '(setq treesit-extra-load-path (list "/root/.emacs.d/tree-sitter"))' \
--eval '(dolist (feature (quote (c-ts-mode cmake-ts-mode csharp-mode \
- dockerfile-ts-mode elixir-ts-mode go-ts-mode heex-ts-mode java-ts-mode \
- js json-ts-mode lua-ts-mode php-ts-mode python ruby-ts-mode rust-ts-mode \
- sh-script typescript-ts-mode css-mode html-ts-mode markdown-ts-mode \
- mhtml-ts-mode toml-ts-mode yaml-ts-mode treesit-x))) (require feature))' \
+ dockerfile-ts-mode elixir-ts-mode heex-ts-mode go-ts-mode java-ts-mode \
+ js json-ts-mode lua-ts-mode python ruby-ts-mode rust-ts-mode sh-script \
+ typescript-ts-mode css-mode html-ts-mode markdown-ts-mode toml-ts-mode \
+ yaml-ts-mode mhtml-ts-mode php-ts-mode treesit-x))) (require feature))' \
--eval '(dolist (lang (mapcar (quote car) treesit-language-source-alist)) \
(treesit-install-language-grammar lang "/root/.emacs.d/tree-sitter"))' \
--eval '(message "treesit-language-source-alist\n%s" \
;;;; Tree-sitter tests.
(ert-deftest js-ts-mode-test-indentation ()
- (skip-unless (treesit-ready-p 'javascript))
+ (skip-unless (and (treesit-ready-p 'javascript) (treesit-ready-p 'jsdoc)))
(ert-test-erts-file (ert-resource-file "js-ts-indents.erts")))
(provide 'js-tests)