Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inline completions not displayed when extending selectedSuggestionInfo range and text #131570

Closed
joyceerhl opened this issue Aug 24, 2021 · 1 comment
Assignees

Comments

@joyceerhl
Copy link
Contributor

Testing #131415

  1. Add the following to the body of provideInlineCompletionItems to return a dummy inline completion item
			if (context.selectedSuggestionInfo !== undefined) {
				if (context.selectedSuggestionInfo.text === 'helloworld1') {
					return [{
						text: 'helloworld1',
						range: context.selectedSuggestionInfo.range,
						trackingId: 'some-id'
					}];
				}
			}
  1. Open an untitled file and add
helloworld1 = 1
hellow
  1. Ctrl+Space to put up suggest widget.
  2. Inline completions not displayed (?) The docstring says "provided inline completions must extend the text of the selected item and use the same range, otherwise they are not shown as preview." Here the completion I'm providing does extend the selected item in the suggest widget, and it uses the same range as what's provided in the context. I don't have context on the inline completions API beyond what's described in Inline Suggestions: Support Interaction With Suggest Widget #129495 so perhaps the docstring could be further clarified if I have misunderstood how this API is supposed to work?
@joyceerhl
Copy link
Contributor Author

I needed to also configure editor.suggest.preview--thanks for the hint @hediet :D

image

@github-actions github-actions bot locked and limited conversation to collaborators Oct 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants