Add showWorkspaceLoadedNotification to vscode client

This allows users to control whether or not they want to see the "workspace
loaded" notification.

This is done on the server side using InitializationOptions which are provided
by the client. By default show_workspace_loaded is true, meaning the
notification is sent.
This commit is contained in:
Ville Penttinen 2019-03-06 11:34:38 +02:00
parent ce118da149
commit 0dcb1cb569
8 changed files with 78 additions and 22 deletions

View file

@ -8,6 +8,7 @@ export class Config {
public highlightingOn = true;
public enableEnhancedTyping = true;
public raLspServerPath = RA_LSP_DEBUG || 'ra_lsp_server';
public showWorkspaceLoadedNotification = true;
private prevEnhancedTyping: null | boolean = null;
@ -24,6 +25,12 @@ export class Config {
this.highlightingOn = config.get('highlightingOn') as boolean;
}
if (config.has('showWorkspaceLoadedNotification')) {
this.showWorkspaceLoadedNotification = config.get(
'showWorkspaceLoadedNotification'
) as boolean;
}
if (!this.highlightingOn && Server) {
Server.highlighter.removeHighlights();
}