feat(tazjin/emacs): enable a bunch of tree-sitter modes

Especially interested in the C++ mode, as I am regularly dealing with
extremely large C++ files where the existing mode is having trouble.

Change-Id: I8c17a35011a23b67043de5de58c4269c636de68b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9308
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
This commit is contained in:
Vincent Ambo 2023-09-12 17:32:38 +03:00 committed by clbot
parent 2b1eb01124
commit 4d0ea1a317

View file

@ -48,4 +48,21 @@
;; Use python-mode for Starlark files. ;; Use python-mode for Starlark files.
(add-to-list 'auto-mode-alist '("\\.star\\'" . python-mode)) (add-to-list 'auto-mode-alist '("\\.star\\'" . python-mode))
;; Use cmake-mode for relevant files.
(add-to-list 'auto-mode-alist '("ya\\.make\\'" . cmake-mode))
;; Use tree-sitter modes for various languages.
(setq major-mode-remap-alist
'((bash-mode . bash-ts-mode)
(c++-mode . c++-ts-mode)
(c-mode . c-ts-mode)
(c-or-c++-mode . c-or-c++-ts-mode)
(json-mode . json-ts-mode)
(python-mode . python-ts-mode)
(rust-mode . rust-ts-mode)
(toml-mode . toml-ts-mode)
(yaml-mode . yaml-ts-mode)
(go-mode . go-ts-mode)
(cmake-mode . cmake-ts-mode)))
(provide 'settings) (provide 'settings)