Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@
"files.trimTrailingWhitespace": true,
"editor.insertSpaces": true,
"editor.tabCompletion": "on",

// Default for any filetype
"editor.rulers": [
99
],

// Exclude build, temp and cache folders
"files.watcherExclude": {
".*/**": true,
Expand All @@ -19,7 +17,6 @@
".venv*/**": true,
"_build/**": true,
},

// Python Settings
// Exclude build, temp and cache folders
"python.analysis.exclude": [
Expand All @@ -42,22 +39,20 @@
},
"editor.defaultFormatter": "charliermarsh.ruff",
},

// Markdown Settings
"[markdown]": {
// We mostly write markdown in some combination with python,
// so we use the same rulers as python.
"editor.rulers": [
79, 99
79,
99
]
},

"bazel.lsp.command": "bazel",
"bazel.lsp.args": [
"run",
"//:starpls_server"
],

// RST Settings
"[restructuredtext]": {
"editor.tabSize": 3,
Expand Down Expand Up @@ -99,8 +94,10 @@
"--ignore-glob=bazel-*/*",
"--ignore-glob=.venv_docs/*",
"--ignore-glob=_build/*",

],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
"rust-analyzer.linkedProjects": [
"${workspaceFolder}/rust-project.json"
],
}
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,9 @@ PROJECT_CONFIG = {

When used with macros like `dash_license_checker`, it allows dynamic selection of file types
(e.g., `cargo`, `requirements`) based on the languages declared in `source_code`.

## IDE support

### Rust

Use `scripts/generate_rust_analyzer_support.sh` to generate `rust_analyzer` settings that will let VS Code work.
6 changes: 6 additions & 0 deletions scripts/generate_rust_analyzer_support.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

set -e

# Manual targets are not take into account, must be set explicitly
bazel run @rules_rust//tools/rust_analyzer:gen_rust_project -- "@//examples/..." "@//src/..." "@//tests/..."
Loading