vscode-surround icon indicating copy to clipboard operation
vscode-surround copied to clipboard

all language support plan

Open heartacker opened this issue 2 years ago • 1 comments

hi yatki, thanks for your work, and seems that this extension is native supported for typescript and javascript. and these is also same feature for anyother languages.

after simple peeking of your code, it is implemented by code snippet with ${TM_SELECTED_TEXT} and I believe that that will be a bad experience for user to add settings to support other languages.

so, here is proposal:

  1. scan the specify language code snippet that contains ${TM_SELECTED_TEXT} and cache them for forth usage
  2. start a plan to support other language by separate config file. and accept Contribution from the community e.g.: add file c.json that contains surround-grammar or code snippet ${TM_SELECTED_TEXT} like

https://github.com/heartacker/snippet-dog/blob/4909e9528de252d17059b7568d415a9960d3da41/snippets/c.json#L4-L20

and csharp.json for c# and so on.

after that, this extension will support all other languages, not only ts/js native

heartacker avatar Aug 21 '21 11:08 heartacker

Hey @heartacker, thank you very much for your interest.

This was actually in my mind for a long time now, but just couldn't find time to work on it. Also, it's not that straightforward because vscode API doesn't allow you to read existing snippets, so they have to be stored in a custom json file.

If you'd like to contribute to this, I'd love to have this feature but I don't have time to add it in the upcoming months at least.

Thank you very much anyways. 🖖🏻

yatki avatar Aug 22 '21 14:08 yatki