diff --git a/server/src/modes/script/javascript.ts b/server/src/modes/script/javascript.ts index d2fc6acae6..b1b89c586a 100644 --- a/server/src/modes/script/javascript.ts +++ b/server/src/modes/script/javascript.ts @@ -213,17 +213,15 @@ export async function getJavascriptMode( } const fileFsPath = getFileFsPath(doc.uri); + const userPrefs: ts.UserPreferences = + doc.languageId === 'javascript' ? config.javascript.preferences : config.typescript.preferences; const details = service.getCompletionEntryDetails( fileFsPath, item.data.offset, item.label, getFormatCodeSettings(config), item.data.source, - { - importModuleSpecifierEnding: 'minimal', - importModuleSpecifierPreference: 'relative', - includeCompletionsWithInsertText: true - } + userPrefs ); if (details && item.kind !== CompletionItemKind.File && item.kind !== CompletionItemKind.Folder) { item.detail = tsModule.displayPartsToString(details.displayParts);