Skip to content

Commit

Permalink
chore: remove and ignore ide specific settings (#19)
Browse files Browse the repository at this point in the history
Add instructions for rust-analyzer command override in CONTRIBUTING.md
instead
  • Loading branch information
sehnryr authored Jul 5, 2024
1 parent bad4990 commit 9148a24
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 33 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,11 @@ target/
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
.idea/

# Visual Studio Code
.vscode/

# Zed
.zed/

# Ignore all src/bindings.rs files generated by wit-bindgen
**/src/bindings.rs
10 changes: 0 additions & 10 deletions .vscode/settings.json

This file was deleted.

22 changes: 0 additions & 22 deletions .zed/settings.json

This file was deleted.

50 changes: 49 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ on it, feel free to [open an issue][new-issue] or a pull request.

1. [Prerequisites](#prerequisites)
1. [Tools](#tools)
2. [Cloning the repository](#cloning-the-repository)
2. [Language server configuration](#language-server-configuration)
3. [Cloning the repository](#cloning-the-repository)
2. [Getting help](#getting-help)
3. [Writing an extension](#writing-an-extension)
1. [File structure](#file-structure)
Expand Down Expand Up @@ -43,6 +44,53 @@ you.
- [cargo-component](https://github.com/bytecodealliance/cargo-component)
- Basic image editing software

### Language server configuration

When using rust-analyzer, you may need to configure it to work with
`cargo-component`. You will need to set the
[`check.overrideCommand`][rust-analuzer-check-overridecommand] option to use
`cargo-component` instead of `cargo check`.

[rust-analuzer-check-overridecommand]: https://rust-analyzer.github.io/manual.html#rust-analyzer.check.overrideCommand

Here is a minimal configuration for VSCode:

```json
{
"rust-analyzer.check.overrideCommand": [
"cargo",
"component",
"check",
"--workspace",
"--all-targets",
"--message-format=json"
],
}
```

Here is a minimal configuration for Zed:

```json
{
"lsp": {
"rust-analyzer": {
"initialization_options": {
"check": {
"overrideCommand": [
"cargo",
"component",
"check",
"--workspace",
"--all-targets",
"--message-format=json"
]
}
}
}
}
}
```

### Cloning the repository

The following steps can be used to skip unrelated extensions and branches, which
Expand Down

0 comments on commit 9148a24

Please sign in to comment.