Skip to content

Commit

Permalink
Register the semantic token provider after standard server is ready
Browse files Browse the repository at this point in the history
Signed-off-by: Sheng Chen <[email protected]>
  • Loading branch information
jdneo committed Jun 29, 2020
1 parent 79fb90d commit 36dc89c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
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

0 comments on commit 36dc89c

Please sign in to comment.