diff --git a/server/src/modes/javascriptMode.ts b/server/src/modes/javascriptMode.ts index ff0e5ce777..171200b960 100644 --- a/server/src/modes/javascriptMode.ts +++ b/server/src/modes/javascriptMode.ts @@ -143,8 +143,12 @@ export function getJavascriptMode(documentRegions: LanguageModelCachefilename)) { + return; + } + const diagnostics = [...jsLanguageService.getSyntacticDiagnostics(filename), - ...jsLanguageService.getSemanticDiagnostics(filename)]; + ...jsLanguageService.getSemanticDiagnostics(filename)]; return diagnostics.map(diag => { return { @@ -156,7 +160,11 @@ export function getJavascriptMode(documentRegions: LanguageModelCachefilename)) { + return; + } + let offset = currentTextDocument.offsetAt(position); let completions = jsLanguageService.getCompletionsAtPosition(filename, offset); if (!completions) { @@ -184,7 +192,11 @@ export function getJavascriptMode(documentRegions: LanguageModelCachefilename)) { + return; + } + let details = jsLanguageService.getCompletionEntryDetails(filename, item.data.offset, item.label); if (details) { item.detail = ts.displayPartsToString(details.displayParts); @@ -195,7 +207,11 @@ export function getJavascriptMode(documentRegions: LanguageModelCachefilename)) { + return; + } + let info = jsLanguageService.getQuickInfoAtPosition(filename, currentTextDocument.offsetAt(position)); if (info) { let contents = ts.displayPartsToString(info.displayParts); @@ -208,7 +224,11 @@ export function getJavascriptMode(documentRegions: LanguageModelCachefilename)) { + return; + } + let signHelp = jsLanguageService.getSignatureHelpItems(filename, currentTextDocument.offsetAt(position)); if (signHelp) { let ret: SignatureHelp = { @@ -246,7 +266,11 @@ export function getJavascriptMode(documentRegions: LanguageModelCachefilename)) { + return; + } + let occurrences = jsLanguageService.getOccurrencesAtPosition(filename, currentTextDocument.offsetAt(position)); if (occurrences) { return occurrences.map(entry => { @@ -260,7 +284,11 @@ export function getJavascriptMode(documentRegions: LanguageModelCachefilename)) { + return; + } + let items = jsLanguageService.getNavigationBarItems(filename); if (items) { let result: SymbolInformation[] = []; @@ -297,7 +325,11 @@ export function getJavascriptMode(documentRegions: LanguageModelCachefilename)) { + return; + } + let definition = jsLanguageService.getDefinitionAtPosition(filename, currentTextDocument.offsetAt(position)); if (definition) { return definition.map(d => { @@ -311,7 +343,11 @@ export function getJavascriptMode(documentRegions: LanguageModelCachefilename)) { + return; + } + let references = jsLanguageService.getReferencesAtPosition(filename, currentTextDocument.offsetAt(position)); if (references) { return references.map(d => { @@ -325,6 +361,11 @@ export function getJavascriptMode(documentRegions: LanguageModelCachefilename)) { + return; + } + let initialIndentLevel = computeInitialIndent(document, range, formatParams); let formatSettings = convertOptions(formatParams, settings && settings.format, initialIndentLevel); let start = currentTextDocument.offsetAt(range.start); @@ -334,7 +375,6 @@ export function getJavascriptMode(documentRegions: LanguageModelCache