Fix unwanted path auto-completion, allow user-invoked completion in strings/comments #264
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
References
Fixes #241
Code changes
with_trigger_kind
replaced withset_trigger_kind_for_next_invocation
as the with the idea did not play well here (it seems that even after converting the callback to await it was only waiting for the invocation, but not for completion due to how commands work); either way it is to be removed as settingtrigger_kind
on an instance is silly and error-prone and should not be done in the first place (but I did not want to re-implementcompleter:invoke-notebook
andcompleter:invoke-file
); now it seems that a thin wrapper/re-implementation/PR upstream which would allow passing thetrigger_kind
when executing the command is the best way out (also described with a TODO comment), but this may be out of the scope of this PR.Maybe, just maybe, a custom implementation of a command, let's name it
completer:trigger
would allow getting rid of the current workaround (but then the value from this PR is in adding a test-case).TODO
completer:trigger
easily, and in the process get rid of two workarounds:trigger_kind
on an instance,User-facing changes
.ipynb-checkpoints
for Python); to workaround howcompleter:invoke-notebook/file
work (auto-completing if there is one suggestion), I add a second dummy (but harmless) suggestion. This is not the final solution, just a workaround.Backwards-incompatible changes
None, but will likely need manual merge with #239
Chores