rust-lang / rust-lang/rust-mode
Not able to use treesitter derived mode with straight
Nobody has claimed this yet.
- Dominant language
- Emacs Lisp
- Stars
- 1.3k
- Forks
- 198
- PR merge metrics
- No merged PRs in 30d
Description
Given the following config, straight will byte compile the package, and generate an autoload file. The autoload file pulls in rust-prog-mode unconditionally. I'm not sure how to workaround this, maybe wrap the file content with a runtime check?
(setq straight-use-package-by-default t)
(use-package rust-mode
:init
(setq rust-mode-treesitter-derive t))
$ cat rust-mode-autoloads.el
...
;;; Generated autoloads from rust-prog-mode.el
(register-definition-prefixes "rust-prog-mode" '("rust-"))
...
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the configuration from the issue with rust-mode-treesitter-derive enabled, then inspect the generated rust-mode-autoloads.el and the rust-prog-mode.el autoload source. Check how straight's byte compilation and autoload generation produce the unconditional reference, and verify that the derived-mode setup no longer loads rust-prog-mode when it is unavailable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- emacs-lisp, rust
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100