I’m new to the forums and to Atom, so hello there, first of all
I’ve already written a syntax highlighting package (language-mbdyn) and I began to extend it with snippets.
Here is where I’ve encountered the first doubts, as Atom does not support nested snippets (as far as I understand). I’ll make and example to clarify.
Suppose that I want to add a structural node to my model with the following syntax:
structural: <node_label>, <node_type>, <initial absolute position>, <initial absolute orientation>, <initial absolute linear velocity>, <initial absolute angular velocity>;
Now, one of the possible realizations of the above syntax may be
structural: HUB, dynamic, reference, REF_HUB, null, reference, REF_HUB, eye, null, null;
so that I cannot assign a snippet to, for example, the
<initial absolute position> parameter, since writing
reference, REF_HUB, null will cause the editor to exit from the snippet tab sequence.
So i thought that, instead of long snippets like the previous one, I might provide only simpler snippets (like, for example, the
reference, <reference_label>, <relative_position> construct) while leaving the full definition of the currently edited entity (the
structural node, in this case) in a side panel as a reference.
My question (at last! Sorry for the length of the post) is: which will be, in your opinion, the best way to achieve this? I’d like for the “hint” to be displayed in a side panel, possibily triggered by a prefix just like a snippet, but a manual intervention of the user, for example through a command, can be acceptable as well.
Thanks in advance to anyone who will take the time to help me.