Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Register the semantic token provider after standard server is ready #1505

Merged
merged 1 commit into from
Jun 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { StandardLanguageClient } from './standardLanguageClient';
import { apiManager } from './apiManager';
import { SnippetCompletionProvider } from './snippetCompletionProvider';
import { runtimeStatusBarProvider } from './runtimeStatusBarProvider';
import { registerSemanticTokensProvider } from './semanticTokenProvider';

const syntaxClient: SyntaxLanguageClient = new SyntaxLanguageClient();
const standardClient: StandardLanguageClient = new StandardLanguageClient();
Expand Down Expand Up @@ -278,8 +279,10 @@ export function activate(context: ExtensionContext): Promise<ExtensionAPI> {
snippetProvider.setActivation(false);
fileEventHandler.setServerStatus(true);
runtimeStatusBarProvider.initialize(context.storagePath);
commands.executeCommand('setContext', 'java:serverMode', event);
// temporary implementation Semantic Highlighting before it is part of LSP
registerSemanticTokensProvider(context);
}
commands.executeCommand('setContext', 'java:serverMode', event);
});
});
});
Expand Down
4 changes: 0 additions & 4 deletions src/standardLanguageClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import { RequirementsData } from "./requirements";
import * as net from 'net';
import { getJavaConfiguration } from "./utils";
import { logger } from "./log";
import { registerSemanticTokensProvider } from "./semanticTokenProvider";
import * as buildPath from './buildpath';
import * as sourceAction from './sourceAction';
import * as refactorAction from './refactorAction';
Expand Down Expand Up @@ -296,9 +295,6 @@ export class StandardLanguageClient {
});
}
excludeProjectSettingsFiles();

// temporary implementation Semantic Highlighting before it is part of LSP
registerSemanticTokensProvider(context);
});
}

Expand Down