Settings: Improve completions of known values #258
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.
Had a look at 8b904c6 and found some possible edge cases to fix.
While looking into it, I found the
(default)
marker not to be added tocolor_scheme
andtheme
completions. Fixed it by extending theformat_completion_item()
.Finally found the
color_scheme
completions missing thesublime-color-scheme
files and fixed it.Note:
The extended
format_completion_item()
could be used in_completions_from_comment()
and_completions_from_default()
to add the(default)
mark, which would result in_marked_default_completions()
not being needed anymore. Left that for now as I am not sure whether it was the better alternative.The main reason for extending
format_completion_item()
was to avoid breaking the description part of the completion label by calling_marked_default_completions()
on color_scheme, encoding or theme completions.