I absolutely loathe Python’s abominable new type annotations syntax. Still, it’s increasingly popular and basically unavoidable in the future, but I want to minimize my day to day exposure to it. So I’m thinking, perhaps I could write a Sublime Text plugin to do this.
Using an example from the Python documentation:
def broadcast_message(message: str, servers: Sequence[Server]) -> None: would show up as
def broadcast_message(message, servers): instead, with some kind of subtle inline indicator that I could click (or use a keyboard shortcut while the cursor is inside the folded version) to toggle between the ugly and the attractive version.
I’m completely new to ST plugin development, and have not used plugins that work in a similar manner. While the API docs have some bits about regions and folding that I’ll use as a starting point, I’d love some further pointers. Are you familiar with ST4-compatible plugins that do something similar, whose source code I could have a look at? Also, is there maybe a document or forum/blog post detailing plugin dev best practices or pitfalls somewhere?