Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Bug 518438 - [lsp] Content assist won't work when trying to use Java'…
…s '.' trigger character

If a ContentAssistProvider instance is wrapping around a language
server, we should not tamper with the lspServer flag by deleting it.
Removing the flag causes the content assist code to no longer
recognize that the current provider is wrapping around a language
server and as a result will fail to compute proposals when using
trigger characters to initiate content assist.

Signed-off-by: Remy Suen <remy.suen@gmail.com>
  • Loading branch information
rcjsuen committed Jun 19, 2017
1 parent 194f88d commit 7b70330
Showing 1 changed file with 1 addition and 2 deletions.
Expand Up @@ -741,7 +741,7 @@ define("orion/editor/contentAssist", [ //$NON-NLS-0$
var charTriggers = null;
if (info.lspServer) {
var capabilities = info.provider.capabilities;
if (capabilities && capabilities.completionProvider) {
if (capabilities && capabilities.completionProvider && !info.charTriggers) {
// we should get the completion options
var completionOptions = capabilities.completionProvider;

Expand All @@ -753,7 +753,6 @@ define("orion/editor/contentAssist", [ //$NON-NLS-0$
triggers += "]";
info.charTriggers = new RegExp(triggers);
}
delete info.lspServer;
}
charTriggers= info.charTriggers;
if (charTriggers && charTriggers.test(currentChar)) {
Expand Down

0 comments on commit 7b70330

Please sign in to comment.