Skip to content

Commit

Permalink
feat: support .rust-project.json
Browse files Browse the repository at this point in the history
  • Loading branch information
fannheyward committed Sep 4, 2024
1 parent 47781c9 commit 48e4a43
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@
{
"fileMatch": "rust-project.json",
"url": "https://json.schemastore.org/rust-project.json"
},
{
"fileMatch": ".rust-project.json",
"url": "https://json.schemastore.org/rust-project.json"
}
],
"configuration": {
Expand Down
1 change: 1 addition & 0 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export function createClient(bin: string, config: Config): LanguageClient {
if (!root) return true;
if (existsSync(join(Uri.parse(root).fsPath, 'Cargo.toml'))) return false;
if (existsSync(join(Uri.parse(root).fsPath, 'rust-project.json'))) return false;
if (existsSync(join(Uri.parse(root).fsPath, '.rust-project.json'))) return false;
return true;
}
let initializationOptions = workspace.getConfiguration('rust-analyzer');
Expand Down

0 comments on commit 48e4a43

Please sign in to comment.