mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 11:24:29 -05:00
Gabritto/semicolons (#46832)
* call formatter in completions * fixes * add test * update api baselines * fix createModifiersFromModifierFlag to not return empty array
This commit is contained in:
committed by
GitHub
parent
f4e1efbc29
commit
404a7d602d
@@ -1842,13 +1842,18 @@ namespace ts.server {
|
||||
const scriptInfo = this.projectService.getScriptInfoForNormalizedPath(file)!;
|
||||
const position = this.getPosition(args, scriptInfo);
|
||||
|
||||
const completions = project.getLanguageService().getCompletionsAtPosition(file, position, {
|
||||
...convertUserPreferences(this.getPreferences(file)),
|
||||
triggerCharacter: args.triggerCharacter,
|
||||
triggerKind: args.triggerKind as CompletionTriggerKind | undefined,
|
||||
includeExternalModuleExports: args.includeExternalModuleExports,
|
||||
includeInsertTextCompletions: args.includeInsertTextCompletions
|
||||
});
|
||||
const completions = project.getLanguageService().getCompletionsAtPosition(
|
||||
file,
|
||||
position,
|
||||
{
|
||||
...convertUserPreferences(this.getPreferences(file)),
|
||||
triggerCharacter: args.triggerCharacter,
|
||||
triggerKind: args.triggerKind as CompletionTriggerKind | undefined,
|
||||
includeExternalModuleExports: args.includeExternalModuleExports,
|
||||
includeInsertTextCompletions: args.includeInsertTextCompletions,
|
||||
},
|
||||
project.projectService.getFormatCodeOptions(file),
|
||||
);
|
||||
if (completions === undefined) return undefined;
|
||||
|
||||
if (kind === protocol.CommandTypes.CompletionsFull) return completions;
|
||||
|
||||
Reference in New Issue
Block a user