diff --git a/package.json b/package.json index daf4b79c..125d7655 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/src/client.ts b/src/client.ts index 1c5e630c..2a803779 100644 --- a/src/client.ts +++ b/src/client.ts @@ -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');