Skip to content

Commit

Permalink
Add an editorconfig and vscode settings
Browse files Browse the repository at this point in the history
The editorconfig and vscode settings for rust-analyzer have been
established as cross-editor settings. At least nvim and vscode itself
support them and people often times have trouble with our cargo fmt
settings which require nightly.

This way, if a supported editor is used, no additional setup is required
by the contributor.
  • Loading branch information
poljar committed Sep 10, 2024
1 parent b56114b commit c368139
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
root = true

[*]
charset = utf-8

end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

indent_style = space
indent_size = 4

[*.md]
trim_trailing_whitespace = false

[*.yml]
indent_size = 2
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"rust-analyzer.checkOnSave.command": "clippy",
"rust-analyzer.cargo.features": "all",
"rust-analyzer.rustfmt": {
"extraArgs": ["+nightly"]
}
}

0 comments on commit c368139

Please sign in to comment.