Skip to content

Commit ea75837

Browse files
Merge branch 'topic/eng/ide/ada_language_server#1645' into 'master'
Show Ada & SPARK status bar item on config files See merge request eng/ide/ada_language_server!1992
2 parents 1d4c24b + 96b42c6 commit ea75837

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

integration/vscode/ada/src/ExtensionState.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,14 +165,19 @@ export class ExtensionState {
165165
public updateStatusBarVisibility = (editor: vscode.TextEditor | undefined) => {
166166
const activeEditor = editor ?? vscode.window.activeTextEditor;
167167

168-
// Show the status bar if the active editor is on an Ada or a GPR source, or
168+
// Show the status bar if the active editor is on an Ada or a GPR source,
169+
// a JSON configuration file that might have an impact on the running ALS
170+
// instance (config.json, als.json, settings.json...) or
169171
// if it's the Output view that is focused (i.e: when the active editor's
170172
// document scheme is set to 'output') and showing Ada & SPARK extension's logs.
171173
if (
172174
activeEditor &&
173-
((activeEditor.document.uri.scheme == 'output' &&
174-
activeEditor.document.fileName.includes('AdaCore')) ||
175-
['ada', 'gpr'].includes(activeEditor.document.languageId))
175+
(['ada', 'gpr'].includes(activeEditor.document.languageId) ||
176+
activeEditor.document.fileName.endsWith('config.json') ||
177+
activeEditor.document.fileName.endsWith('als.json') ||
178+
activeEditor.document.fileName.endsWith('settings.json') ||
179+
(activeEditor.document.uri.scheme == 'output' &&
180+
activeEditor.document.fileName.includes('AdaCore')))
176181
) {
177182
this.statusBar.show();
178183
} else {

0 commit comments

Comments
 (0)