Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0f89ca5

Browse filesBrowse files
author
Akos Kitta
committed
Removed obsolete compilation DB param.
- Adjusted the document selector to trigger LS start with C++ and header files. - Enabled `log` by default. Signed-off-by: Akos Kitta <kittaakos@typefox.io>
1 parent 328b54e commit 0f89ca5
Copy full SHA for 0f89ca5

File tree

Expand file treeCollapse file tree

1 file changed

+2
-9
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-9
lines changed

‎src/extension.ts

Copy file name to clipboardExpand all lines: src/extension.ts
+2-9Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ interface LanguageServerConfig {
99
readonly lsPath: string;
1010
readonly cliPath: string;
1111
readonly clangdPath: string;
12-
/**
13-
* Filesystem path pointing to the folder that contains the `compile_commands.json` file.
14-
*/
15-
readonly compileCommandsPath?: string;
1612
readonly board: {
1713
readonly fqbn: string;
1814
readonly name?: string;
@@ -144,14 +140,11 @@ function buildLanguageClient(config: LanguageServerConfig): LanguageClient {
144140
if (!serverTraceChannel) {
145141
serverTraceChannel = vscode.window.createOutputChannel('Arduino Language Server (trace)');
146142
}
147-
const { lsPath: command, clangdPath, cliPath, board, flags, env, compileCommandsPath } = config;
143+
const { lsPath: command, clangdPath, cliPath, board, flags, env } = config;
148144
const args = ['-clangd', clangdPath, '-cli', cliPath, '-fqbn', board.fqbn];
149145
if (board.name) {
150146
args.push('-board-name', board.name);
151147
}
152-
if (compileCommandsPath) {
153-
args.push('-compile-commands-dir', compileCommandsPath);
154-
}
155148
if (flags && flags.length) {
156149
args.push(...flags);
157150
}
@@ -165,7 +158,7 @@ function buildLanguageClient(config: LanguageServerConfig): LanguageClient {
165158
},
166159
{
167160
initializationOptions: {},
168-
documentSelector: ['ino'],
161+
documentSelector: ['ino', 'c', 'cpp', 'h', 'hpp'],
169162
uriConverters: {
170163
code2Protocol: (uri: vscode.Uri): string => (uri.scheme ? uri : uri.with({ scheme: 'file' })).toString(),
171164
protocol2Code: (uri: string) => vscode.Uri.parse(uri)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.