SublimeText / PackageDev

Tools to ease the creation of snippets, syntax definitions, etc. for Sublime Text.
MIT License
436 stars 83 forks source link

Settings: Improve completions of known values #258

Closed deathaxe closed 5 years ago

deathaxe commented 5 years ago

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 to color_scheme and theme completions. Fixed it by extending the format_completion_item().

Finally found the color_scheme completions missing the sublime-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.