-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
Trigger chat variable completion on word start #224174
Trigger chat variable completion on word start #224174
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! With this, if I have the cursor at the end or in the middle of a partial word, like #sele|
or #s|ele
where |
marks the cursor, then I don't get completions. I think it should be checking for a word before #
, not before the point where completions are requested.
@roblourens Right you are, changed it to use matched word start column |
With this change, if I just type |
14f8d5b
to
afd2186
Compare
fell for the classic off by 1 error, fixed and tested |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me now, thanks!
* And to `computeCompletionRanges` support for allowing completions only on word start * use word start column instead of cursor position * Fix wrong column number
closes #216757
Added optional boolean parameter to
computeCompletionRanges
calledonlyOnWordStart
, which dictates to return the range only if the foundvarWord
is at word start.Set it as true on chat input variable completion (
#
)