Disclaimer: Newbie to altering ST eg. new syntaxes, completions etc. New to YAML and other data storage formats
I’m working on setting up an extended syntax from YAML.
I have a large list of words that I would like to be able to use across syntax and completion files. Ideally by creating that list of words in a suitable format that can be used across multiple sublime files.
The goal is to have the core list of words able to edited by users who are not familiar with the intricacies of the underlying systems. So the list needs to be able to be reliably edited without complicated data structures being involved in the first instance.
Either by creating a variable in a sublime file that can then be accessed from OTHER sublime files.
OR perhaps by creating a single master file that can be imported into each sublime file that needs it.
The goal being to have one authoritative place to make changes to that master list.
One stumbling block is that different sublime files use different interpreters.
eg. sublime-syntax uses YAML
sublime-completions uses JSON
That may not matter since my understanding is that JSON is a sub-set of YAML, so perhaps compatibility is easy.
If my list of words is:
Rule
View
Views
Look
Then I need to be able to present that list in different ways to different sublime files.
For instance, a syntax file will need those words in a regex format so it can find any of them.
Ignoring the surrounding regex code, I would need to be able to present this list in the syntax file as:
Rule|View|Views|Look
And it would need to be presented to the sublime-completions file in a different way again.
I’m currently stuck on how to get completions to operate reliably with one word.
So I don’t know how to even make a set of completions that would present the above list as options for completing in my files.
In any case, I FEEL like the point of YAML is to enable this kind of interoperability.
Perfectly glad to be pointed at pages or given keywords to search for.
Thanks!