Fix autocomplete for environment editor names

This commit is contained in:
Gregory Schier
2024-06-02 17:52:51 -07:00
parent b47ec01f9c
commit 8f3bdb5039
5 changed files with 22 additions and 21 deletions

View File

@@ -20,7 +20,11 @@ export interface GenericCompletionConfig {
/**
* Complete options, always matching until the start of the line
*/
export function genericCompletion({ options, minMatch = 1 }: GenericCompletionConfig) {
export function genericCompletion(config?: GenericCompletionConfig) {
if (config == null) return [];
const { minMatch = 1, options } = config;
return function completions(context: CompletionContext) {
const toMatch = context.matchBefore(/.*/);