fix: user command completion on v0.12.0#296
Open
c-c-k wants to merge 3 commits intonoib3:mainfrom
Open
Conversation
bb19716 to
7b96ca2
Compare
Contributor
Author
|
Will drop the v0.10 flags, sec |
7b96ca2 to
059baf6
Compare
* Change `CommandInfos::complete`'s type from `String` to `CommandComplete`. * Add custom serde deserializer for `CommandComplete`.
059baf6 to
6c884f0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Depends on #295 for
neovim-0-12feature flag.Changes
CommandInfos::complete's type fromStringtoCommandCompleteand adds a custom serde deserializer forCommandCompletefor NVIM v0.12.0 and Nightly.This was necessary to fix the failing
create_del_user_commandanduser_command_with_counttests because v0.12.0 modified a few of the builtin plugins commands to define thecompletefield directly as a Lua function instead of as a"customlist"with acomplete_arg="v:lua..."field.I have applied the change only to v0.12.0 and Nightly but it is actually compatible with v0.10.0 and v0.11.0 as well.
In addition the I have updated the values in the
CommandCompleteenum to the corresponding values available in NVIM v0.10.0, v0.11.0 and v0.12.0.Because the original
CommandCompleteenum already had a field namedCustomListwhich was mapped to a function upon creation of a new command I have added the valuesCustomFromCompleteArgandCustomlistFromCompleteArgwhich map to
"custom"and"customlist".