Skip to content

Commit

Permalink
chore: disable built in completions
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacasonato committed Dec 8, 2020
1 parent 82c98ee commit f78559b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions typescript-deno-plugin/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,19 @@ class Plugin implements ts.server.PluginModule {
}
};

const getCompletionsAtPosition = (
fileName: string,
position: number,
options: ts.GetCompletionsAtPositionOptions | undefined,
) => {
const { enable } = getSettings(this.project);
if (enable) {
return undefined;
} else {
return ls.getCompletionsAtPosition(fileName, position, options);
}
};

const getDocumentHighlights = (
fileName: string,
position: number,
Expand All @@ -132,6 +145,7 @@ class Plugin implements ts.server.PluginModule {
getDocumentHighlights,
getReferencesAtPosition,
getDefinitionAndBoundSpan,
getCompletionsAtPosition,
};
}

Expand Down

0 comments on commit f78559b

Please sign in to comment.