diff options
author | Vincent Ambo <tazjin@tvl.su> | 2023-09-12T14·32+0300 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2023-09-12T15·07+0000 |
commit | 4d0ea1a317ba035f26458a1853c0949219a129f6 (patch) | |
tree | bdd1408484113a828019a3d3b9a86823e7205a48 /users/tazjin/emacs/config/settings.el | |
parent | 2b1eb01124aa4ee4821996f91af1d3d326365057 (diff) |
feat(tazjin/emacs): enable a bunch of tree-sitter modes r/6585
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
Diffstat (limited to 'users/tazjin/emacs/config/settings.el')
-rw-r--r-- | users/tazjin/emacs/config/settings.el | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/users/tazjin/emacs/config/settings.el b/users/tazjin/emacs/config/settings.el index 8d542bd7ae48..5c7b47f60c87 100644 --- a/users/tazjin/emacs/config/settings.el +++ b/users/tazjin/emacs/config/settings.el @@ -48,4 +48,21 @@ ;; Use python-mode for Starlark files. (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) |