Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Auto-load of ts major mode fails when no other alternative major mode exists #110

Open
bnicolae opened this issue Aug 2, 2024 · 0 comments

Comments

@bnicolae
Copy link

bnicolae commented Aug 2, 2024

cmake-ts-mode is not automatically loaded when opening CMakeLists.txt files. This is because auto-mode-alist is missing the following line:

("\\(?:CMakeLists\\.txt\\|\\.cmake\\)\\'" . cmake-ts-mode)

After manually loading it (M-x cmake-ts-mode) this line is added to auto-mode-alist. Note that I don't have any other major cmake mode. When I install one ((e.g., cmake-mode), treesit-auto correctly replaces it. Expected behavior: load cmake-ts-mode regardless whether an alternative exists or not.

I am using this configuration in ~/.emacs:

  :custom
  (treesit-auto-install 'prompt)
  :config
  (treesit-auto-add-to-auto-mode-alist 'all)
  (global-treesit-auto-mode))```
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant