From 6c123f7bc3539e591d091af80a11c90cb7420200 Mon Sep 17 00:00:00 2001 From: Remi Thebault Date: Mon, 14 Nov 2022 00:57:39 +0100 Subject: [PATCH] config key d.ccdbPath for compile_commands.json --- package.json | 6 ++++++ src/extension.ts | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index ef5d214..24a6790 100644 --- a/package.json +++ b/package.json @@ -918,6 +918,12 @@ "order": 1, "markdownDescription": "Array of workspace-relative (or absolute) folders to force start a project instance in." }, + "d.ccdbPath": { + "type": "string", + "scope": "resource", + "default": null, + "description": "Path to a Clang compilation database (aka. CCDB, aka. `compile_commands.json`) to use to lint this project" + }, "d.dmdPath": { "type": "string", "scope": "machine-overridable", diff --git a/src/extension.ts b/src/extension.ts index ff1694d..e8d271b 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -222,7 +222,8 @@ async function startClient(context: vscode.ExtensionContext) { vscode.workspace.createFileSystemWatcher("**/*.d"), vscode.workspace.createFileSystemWatcher("**/dub.json"), vscode.workspace.createFileSystemWatcher("**/dub.sdl"), - vscode.workspace.createFileSystemWatcher("**/profilegc.log") + vscode.workspace.createFileSystemWatcher("**/profilegc.log"), + vscode.workspace.createFileSystemWatcher("**/compile_commands.json"), ] }, revealOutputChannelOn: RevealOutputChannelOn.Never,