File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import { RequestType0 } from "vscode-languageclient";
66import { LanguageClient } from "vscode-languageclient/node" ;
77import { Logger } from "../logging" ;
88import { LanguageClientConsumer } from "../languageClientConsumer" ;
9+ import { getSettings } from "../settings" ;
910
1011interface ICommand {
1112 name : string ;
@@ -68,8 +69,8 @@ export class GetCommandsFeature extends LanguageClientConsumer {
6869 return ;
6970 }
7071 await this . languageClient . sendRequest ( GetCommandRequestType ) . then ( ( result ) => {
71- const SidebarConfig = vscode . workspace . getConfiguration ( "powershell .sideBar" ) ;
72- const excludeFilter = ( SidebarConfig . CommandExplorerExcludeFilter ) . map ( ( filter : string ) => filter . toLowerCase ( ) ) ;
72+ const exclusions = getSettings ( ) . sideBar . CommandExplorerExcludeFilter ;
73+ const excludeFilter = exclusions . map ( ( filter : string ) => filter . toLowerCase ( ) ) ;
7374 result = result . filter ( ( command ) => ( excludeFilter . indexOf ( command . moduleName . toLowerCase ( ) ) === - 1 ) ) ;
7475 this . commandsExplorerProvider . powerShellCommands = result . map ( toCommand ) ;
7576 this . commandsExplorerProvider . refresh ( ) ;
Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ class DebuggingSettings extends PartialSettings {
102102}
103103
104104class DeveloperSettings extends PartialSettings {
105- featureFlags = [ ] ;
105+ featureFlags : string [ ] = [ ] ;
106106 // From `<root>/out/main.js` we go to the directory before <root> and
107107 // then into the other repo.
108108 bundledModulesPath = "../../PowerShellEditorServices/module" ;
@@ -130,8 +130,8 @@ class IntegratedConsoleSettings extends PartialSettings {
130130}
131131
132132class SideBarSettings extends PartialSettings {
133- // TODO: add CommandExplorerExcludeFilter
134133 CommandExplorerVisibility = true ;
134+ CommandExplorerExcludeFilter : string [ ] = [ ] ;
135135}
136136
137137class PesterSettings extends PartialSettings {
You can’t perform that action at this time.
0 commit comments