Skip to content

Setup editor file associations for non-rs extensions #139843

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

thaliaarchi
Copy link
Contributor

.gitattributes lists *.fixed, *.pp, and *.mir as file extensions which should be treated as Rust source code. Do the same for VS Code and Zed. This only does syntax highlighting, which is appropriate, as MIR isn't really Rust code.

At the same time, consistently order rust-analyzer.linkedProjects between editors. For some reason, Eglot didn't include library/Cargo.toml.

I have tested this with VS Code and Zed. I have not implemented it for Emacs/Eglot or Helix.

@rustbot
Copy link
Collaborator

rustbot commented Apr 15, 2025

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 15, 2025
@thaliaarchi
Copy link
Contributor Author

Also, I noticed that VS Code does not have these two settings which the other editors have:

"rust-analyzer.cargo.buildScripts.invocationLocation": "root"
"rust-analyzer.check.invocationLocation": "root"

@rust-log-analyzer

This comment has been minimized.

.gitattributes lists *.fixed, *.pp, and *.mir as file extensions which
should be treated as Rust source code. Do the same for VS Code and Zed.
This only does syntax highlighting, which is appropriate, as MIR isn't
really Rust code.

At the same time, consistently order `rust-analyzer.linkedProjects`
between editors. For some reason, Eglot didn't include
library/Cargo.toml.
@thaliaarchi thaliaarchi force-pushed the editor-file-associations branch from 8cc9a49 to d1e82ba Compare April 15, 2025 06:16
@rustbot rustbot added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Apr 15, 2025
@Mark-Simulacrum
Copy link
Member

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Apr 19, 2025

📌 Commit d1e82ba has been approved by Mark-Simulacrum

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants