massCodeIO / assistant-vscode

massCode assistant for VS Code
MIT License
28 stars 10 forks source link

Add snippet language and name automatically. #13

Open sarvesh4396 opened 1 year ago

sarvesh4396 commented 1 year ago

It would be great if the language and name of the snippet were added automatically from the file. and could be changed by the user.

As the language is by default plain_text.

{
          label: 'Fragment 1',
          value: content,
          language: 'plain_text'
 }

language can be fetched from VsCode API window.activeTextEditor?.document.languageId.