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

Enabling via use-package for Cargo.toml overrides conf-toml-mode #105

Open
hrls opened this issue Oct 31, 2020 · 3 comments
Open

Enabling via use-package for Cargo.toml overrides conf-toml-mode #105

hrls opened this issue Oct 31, 2020 · 3 comments

Comments

@hrls
Copy link

hrls commented Oct 31, 2020

How to enable cargo-minor-mode for Cargo.toml via use-package?
This snippet just overrides default conf-toml-mode and disable syntax highlightning.
=/

(use-package cargo
  :magic ("Cargo.toml" . cargo-minor-mode)
  :hook (rust-mode . cargo-minor-mode))
@kwrooijen
Copy link
Owner

kwrooijen commented Oct 31, 2020

Try this:

(use-package cargo
  :hook ((rust-mode . cargo-minor-mode)
         (toml-mode . cargo-minor-mode)))

@hrls
Copy link
Author

hrls commented Oct 31, 2020

But toml-mode is not available. I am using conf-toml-mode which is derive from default conf-mode.
Also I dont want to enable cargo-minor-mode for any *.toml file, only for Cargo.toml

@hrls
Copy link
Author

hrls commented Oct 31, 2020

And even this one doesn't work as expected:

(use-package cargo
  :mode ("Cargo.toml" . cargo-minor-mode)
  :hook (rust-mode . cargo-minor-mode))

Looks like cargo-minor-mode overrides conf-toml-mode, but this is unexpected behaviour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants