improve suggestionProvider

pull/4175/head
yann300 1 year ago
parent 403e7a3f68
commit 144b5440c8
  1. 7
      libs/remix-ui/editor/src/lib/providers/inlineCompletionProvider.ts

@ -12,6 +12,10 @@ export class RemixInLineCompletionProvider implements monacoTypes.languages.Inli
}
async provideInlineCompletions(model: monacoTypes.editor.ITextModel, position: monacoTypes.Position, context: monacoTypes.languages.InlineCompletionContext, token: monacoTypes.CancellationToken): Promise<monacoTypes.languages.InlineCompletions<monacoTypes.languages.InlineCompletion>> {
if (context.selectedSuggestionInfo) {
console.log('return empty from provideInlineCompletions')
return;
}
// get text before the position of the completion
const word = model.getValueInRange({
startLineNumber: 1,
@ -44,7 +48,8 @@ export class RemixInLineCompletionProvider implements monacoTypes.languages.Inli
return { items: [] };
}
return {
items: [item]
items: [item],
enableForwardStability: true
}
}

Loading…
Cancel
Save