omni: racket should complete at end of keywords #4352
Merged
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.
Consider a file like
Type
Go(eventspace-
.Pressing to trigger omnicomplete should suggest
It does not (instead producing "top-level" completions, as if
(eventspace-
wasn't even there).Debugging, place the cursor on a space after. Now
ale#completion#OmniFunc(1, '')
correctly returns1
, but when given(0, 'eventspace-')
it returns either the empty list or generic completion results as described above. I'm not entirely sure of the mechanism, but it seems thatb:ale_completion_info.prefix
is the key, and that this is set byale#completion#GetPrefix
. Callingale#completion#GetPrefix('racket', line('.'), col('.'))
returned''
!Now, it returns
eventspace-
and the completions work correctly again.Ref #4293, #4186, #3870