What I fail to understand is how these scopes are going to affect indexing and autocompletions.
In a syntax I’m working on, I’ve followed all the scoping rules as close as I could — i.e. scope classes, instances, etc., following the guidelines of the Documentation — but then I didn’t see any gain in terms of autocompletions.
Although I’ve added to the indexing all type of identifiers, it doesn’t seem like ST provides autocompletions as I would expects.
For example, in instances I would declaration I’d expect ST to autocomplete the class part using the indexed class-tokens, but this is not happening.
The documentation doesn’t really explain the purpose of these scopes beyond being able to control syntax highlighting via custom themes. While syntax coloring is a nice feature, being able to control autocompletions is more important.
In the Documentation we find all these (rather vague and abstact) guidelines on how every syntax element should be semantically scoped, but reveals nothing on how these are used beside syntax coloring. Also, these guidelines are not easy to apply to many languages outside the mainstream (yet, non mainstream syntaxes are more likely to need a new syntax definition in the first place).
I wish these docs would provide some hints on how to deal with unusual syntaxes which might require adopting different scopes. Which of these scopes are really important to make the most of ST? Which are, on the other hand, only important for syntax highlighting themes?
As I started to work on my own custom ST syntaxes, to be able to use ST to edit other languages which come with old school IDEs, my original enthusiasm for ST has diminished. It’s been some years now that I have purchased my ST license, and have been using it every day for work, but in these years its documentation hasn’t grown much — it’s still a few pages in total.
In the last six monthes I’ve began to seriously look into other editors similar to ST, like Atom and VSCode. Although I’m quite aware that no Electron/JS based editor is ever going to be as perfomant as ST (which I can tell is a very well code-optimized product), I nevertheless started to consider that lack of documentation constitutes a huge barrier in terms of being able to customize the editor.
Ultimately, I might be willing to trade off performance in exchange of good documentaion and accessibility to the source.
At least with an open source editor you can always peek at the source to understand how it handles scopes in terms of indexing and autocompletions, and you are never really faced with a Black-Box design. With ST, on the other hand, you can only hope that the documentation will be updated (indeed, written) one day; but I’m starting to doubt that this will ever happen as the documentation has been rather stale for a while.
The documentation page even links to the unofficial documentation as a reference (which is great project, although for ST2, not 3). The fact that the only true source of knowledge is an unofficial documentation makes me think that documentation hasn’t been a top priority and, most likely, it will never be.
The natively shipped syntaxes aren’t really much of an inspiration either, as they barely contain any useful comments.
At the end of the day, I was hoping that ST would empower me to create my own packages to work with any exotic syntax I needed. What really annoys me is being put in a position of having to continually ask on the forums for hints on how to procede, while if I were provided some decent documentation and examples I’d be able to take my time and learn what is needed — which, by the way, tends to lessen the sensation of being a total idiot, for you can prove that provided some decent documentation you’re able to make your way through it.
@kingkeith and @FichteFoll, have you any advise to give me in this regard? I’ve seen that you are quite prolific in developing packages and, if I’m not mistaken, at least one of you is actively enganged with the ST team.
I’m a missing out something? All the resources I could find for developing packages are mostly fragmented over the forums or some Issues in one of ST repos, which makes it rather difficult to sift through what is old-dated and what is up to date with the current version.
I see that I’m not alone in this kind of frustration, as basic questions on syntaxes how-tos are daily on the fourm (which makes me think that if more time was invested in the documentation, on the long run it would turn out a time-saver in terms of replying to similar posts). And I’ve seen quite a few of my collaborators move on to VSCode for these very same reasons.