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

Merged
merged 1 commit into from
Apr 20, 2025

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
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 19, 2025
…enton

Rollup of 7 pull requests

Successful merges:

 - rust-lang#139042 (Do not remove trivial `SwitchInt` in analysis MIR)
 - rust-lang#139533 (add next_index to Enumerate)
 - rust-lang#139843 (Setup editor file associations for non-rs extensions)
 - rust-lang#140000 (skip llvm-config in autodiff check builds, when its unavailable)
 - rust-lang#140008 (Improve `clean_maybe_renamed_item` function code a bit)
 - rust-lang#140024 (Remove early exits from JumpThreading.)
 - rust-lang#140039 (Add option for stable backport poll)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 8955c6c into rust-lang:master Apr 20, 2025
6 checks passed
@rustbot rustbot added this to the 1.88.0 milestone Apr 20, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Apr 20, 2025
Rollup merge of rust-lang#139843 - thaliaarchi:editor-file-associations, r=Mark-Simulacrum

Setup editor file associations for non-rs extensions

.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.
@thaliaarchi thaliaarchi deleted the editor-file-associations branch April 20, 2025 06:44
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.

5 participants