Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

all language support plan #78

Open
heartacker opened this issue Aug 21, 2021 · 1 comment
Open

all language support plan #78

heartacker opened this issue Aug 21, 2021 · 1 comment

Comments

@heartacker
Copy link

heartacker commented Aug 21, 2021

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

@yatki
Copy link
Owner

yatki commented Aug 22, 2021

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. 🖖🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants