sublime_lib
sublime_lib copied to clipboard
ST API adjustments
The next ST build will include the following changes. I'm just listing those that are relevant for us for now.
- [ ] Settings objects can be accessed like a dict natively.
- [ ] Functions to iterate and find syntax definitions.
- [ ] New enum for completion item kind.
I went through the current API docs to produce a hopefully-complete list.
Python 3.8
Compat/types
- [ ] Remove enum, pathlib, and typing from
_compatand import the native versions instead. - [ ] Simplify/update some type annotations. Possibly use
from __future__ import annotations.
Other
- [ ] Make
SettingsDict.update'sotherargument positional-only.
Sublime 4 API
Flags
New values for existing enums
- [ ]
PopupOption:KEEP_ON_SELECTION_MODIFIED,HIDE_ON_CHARACTER_EVENT. - [ ]
OpenFileOption:ADD_TO_SELECTION,REPLACE_MRU,SEMI_TRANSIENT - [ ]
CompletionOptions:DYNAMIC_COMPLETIONS,INHIBIT_REORDER - [ ]
QuickPanelOption:WANT_EVENT
New enums
- [ ]
CompletionFormat:TEXT,SNIPPET,COMMAND - [ ]
KindId:AMBIGUOUS,KEYWORD,TYPE,FUNCTION,NAMESPACE,NAVIGATION,MARKUP,VARIABLE,SNIPPET,COLOR_* - [ ] Maybe one for the preconstructed kind tuples as well.
- [ ]
SymbolSource:ANY,INDEX,OPEN_FILES - [ ]
SymbolType:ANY,DEFINITION,REFERENCE
Syntax
- [ ] Reimplement
list_syntaxesandget_syntax_for_scopeusingsublime.list_syntaxesandsublime.find_syntax_by_scope. - [ ] Return
sublime.Syntaxinstead ofSyntaxInfonamedtuple.
Settings
- [ ] Implement methods requiring iterability. (Could there be performance concerns here?)
Panels
- [ ] Reimplement
Panel.exists()usingView.element()?????
show_selection_panel
- [ ] Handle
QuickPanelItemarguments. - [ ] Add
placeholderargument. - [ ] Handle
WANT_EVENT(i.e. make sure we pass the correct number of arguments in either case).
Ecosystem
- [ ] Create a dependency for Sublime type stubs and use it rather than bundling stubs here.
- [ ] Update UnitTesting if needed.
Feel free to edit my initial post with these and track them there.