Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Fix rust ts mode priority #7818

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Dev380
Copy link
Contributor

@Dev380 Dev380 commented Apr 13, 2024

If rust-ts-mode is used as the base of rust-mode
then it will automatically add itself to auto-mode-alist
before rustic-mode, causing every file other than
the first to be opened to default to rust-ts-mode
instead. This can be fixed by removing the treesitter
mode from the list after it gets set when the package
loads. This will change behaviour if:

  1. both this module and the tree sitter mode are enabled
  2. the user loads the rust-ts-mode package in some way
  3. the user intends for rust-ts-mode to be prioritized
    over the doom module.

However, this is unlikely to be the case.


If `rust-ts-mode` is used as the base of `rust-mode`
then it will automatically add itself to `auto-mode-alist`
before `rustic-mode`, causing every file other than
the first to be opened to default to `rust-ts-mode`
instead. This can be fixed by removing the treesitter
mode from the list after it gets set when the package
loads. This will change behaviour if:

1) both this module and the tree sitter mode are enabled
2) the user loads the `rust-ts-mode` package in some way
3) the user intends for `rust-ts-mode` to be prioritized
over the doom module.

However, this is unlikely to be the case.
@hlissner hlissner added is:bug Something isn't working as intended module:lang/rust Pertains to Doom's :lang rust module was:moved Is, was, or will be addressed elsewhere labels Apr 22, 2024
@hlissner hlissner added this to the modules v24.06 milestone Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is:bug Something isn't working as intended module:lang/rust Pertains to Doom's :lang rust module was:moved Is, was, or will be addressed elsewhere
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants