mirror of
https://github.com/cameron-martin/bazel-lsp.git
synced 2025-08-04 14:28:24 +00:00
build: Use rust-project.json (#10)
Now that https://github.com/bazelbuild/rules_rust/pull/2450 is fixed, we can use a `rust-project.json` instead of `Cargo.toml` for IDE features.
This commit is contained in:
parent
abc99e964b
commit
0364d75588
4 changed files with 31 additions and 1 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
|||
/target
|
||||
/bazel-*
|
||||
/MODULE.bazel.lock
|
||||
/MODULE.bazel.lock
|
||||
/rust-project.json
|
||||
|
|
5
.vscode/settings.json
vendored
Normal file
5
.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"rust-analyzer.linkedProjects": [
|
||||
"rust-project.json"
|
||||
]
|
||||
}
|
22
.vscode/tasks.json
vendored
Normal file
22
.vscode/tasks.json
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "Generate rust-project.json",
|
||||
"command": "bazel",
|
||||
"args": ["run", "@rules_rust//tools/rust_analyzer:gen_rust_project"],
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
"group": "build",
|
||||
"problemMatcher": [],
|
||||
"presentation": {
|
||||
"reveal": "never",
|
||||
"panel": "dedicated",
|
||||
},
|
||||
"runOptions": {
|
||||
"runOn": "folderOpen"
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
|
@ -1,5 +1,7 @@
|
|||
bazel_dep(name = "rules_rust", version = "0.38.0")
|
||||
|
||||
git_override(module_name = "rules_rust", remote = "https://github.com/bazelbuild/rules_rust.git", commit = "547f6a0666024c4b14b794598ecac3ce56a5e950")
|
||||
|
||||
rust = use_extension("@rules_rust//rust:extensions.bzl", "rust")
|
||||
rust.toolchain(
|
||||
edition = "2021",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue