Closed liuxuzxx closed 3 months ago
But when I use vscode to open {{projectName}}-ebpf alone, vscode's code prompts and jumps are normal, which means rust-analyzer works.
I found this configuration to be invalid
{
"rust-analyzer.linkedProjects": [
"Cargo.toml",
"tracepoint-hello-ebpf/Cargo.toml",
"liuxu-found/Cargo.toml"
]
}
I resolved the problem, Look: https://github.com/rust-lang/rust-analyzer/issues/17664 .It is a bug of rust-analyzer
rust-analyzer: v0.3.2053
So You must modify the path to (Use the absolute path):
{
"rust-analyzer.linkedProjects": [
"Cargo.toml",
"/xx/xxxxx/tracepoint-hello-ebpf/Cargo.toml",
"/xx/xxxxx/liuxu-found/Cargo.toml"
]
}
如果使用的最近基本版本的rust-analyzer,那么就需要使用绝对地址来解决
Or use this:
{
"rust-analyzer.linkedProjects": [
"${workspaceFolder}/Cargo.toml",
"${workspaceFolder}/tracepoint-hello-ebpf/Cargo.toml"
]
}
My environment is: