Open jmetz opened 4 months ago
Hi! It can be implemented with some restrictions. I don't use snippets heavily and don't know common standards for variables in snippets. This is "standard": https://code.visualstudio.com/docs/editor/userdefinedsnippets#_variables ?
Yeah that looks pretty comparable to other snippet systems I've used before 👍
Those would be great, especially TM_SELECTED_TEXT which allows for way more powerful snippets.
Hi!
I have take a look on it https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#snippet_syntax
Variable resolving is the task for editor (client side), not for language-server. I hope after https://github.com/helix-editor/helix/pull/9801 we can use varaibles in templates
For scls we can add feature - snippets as result of shell execution, like :pipe
. Helix now allow via keymap configure hot keys for :pipe my-snippet.sh
. But scls can give menu as regular snippet and execute on complete/resolve
with litle hacks.
I just checked the code for helix-editor/helix#9801 and tested it (which is the branch I use). It currently implements variable parsing, but it does not seem to have support for any specific variables yet, but the fact it has got that far is good news.
There are a bunch of common system variables that spring to mind, including date-time related, username, email, or perhaps even the result of a shell command.