Skip to content

Commit 1d63100

Browse files
author
Ravi Chande
committed
CR feedback: move option into C# options and use better empty array syntax
1 parent 833b28a commit 1d63100

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,11 @@
323323
"default": true,
324324
"description": "Suppress 'hidden' diagnostics (such as 'unnecessary using directives') from appearing in the editor or the Problems pane."
325325
},
326+
"csharp.showReferencesCodeLens": {
327+
"type": "boolean",
328+
"default": true,
329+
"description": "Specifies whether the references CodeLens show be shown."
330+
},
326331
"omnisharp.path": {
327332
"type": [
328333
"string",
@@ -373,11 +378,6 @@
373378
"type": "boolean",
374379
"default": true,
375380
"description": "Specifes whether OmniSharp should use VS Code editor settings for C# code formatting (use of tabs, indentation size)."
376-
},
377-
"omnisharp.showReferencesCodeLens": {
378-
"type": "boolean",
379-
"default": true,
380-
"description": "Specifies whether Omnisharp should show the references CodeLens"
381381
}
382382
}
383383
},

src/features/codeLensProvider.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ export default class OmniSharpCodeLensProvider extends AbstractProvider implemen
4747
const options = Options.Read();
4848
if (!options.showReferencesCodeLens)
4949
{
50-
let arr: vscode.CodeLens[] = [];
51-
return arr;
50+
return [];
5251
}
5352

5453
return serverUtils.currentFileMembersAsTree(this._server, { FileName: document.fileName }, token).then(tree => {

src/omnisharp/options.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export class Options {
5252

5353
const useFormatting = csharpConfig.get<boolean>('format.enable', true);
5454

55-
const showReferencesCodeLens = omnisharpConfig.get<boolean>('showReferencesCodeLens', true);
55+
const showReferencesCodeLens = csharpConfig.get<boolean>('showReferencesCodeLens', true);
5656

5757
return new Options(path,
5858
useMono,

0 commit comments

Comments
 (0)