vscode-postfix-ts icon indicating copy to clipboard operation
vscode-postfix-ts copied to clipboard

Language-based context

Open dpalay opened this issue 4 years ago • 1 comments

This is a fantastic extension! I'd love to see it a bit more generalized with the ability to have language-dependent postfixes. For example, during ETL development, I'm often writing code like

[newColumn] = cast(db.dbo.sourceColumn as nvarchar(50))

and it would be really great to just be able to say [newColumn] = db.dbo.sourceColumn.nvar But, I wouldn't want the templates to be available in other languages, and I definitely wouldn't need the other templates from javascript available when I'm editing a .sql file.

dpalay avatar May 06 '21 16:05 dpalay

Well... this extension has TS in its name for a reason :) It was meant to be only used for JS/TS. The setting to include arbitrary file type was meant to include files which can contain JS/TS like HTML for instance. The way you are using it is abusing the original idea a bit :) However this seems like quite a small effort so I will consider adding that as this could be helpful for JS in HTML scenario as well.

ipatalas avatar May 15 '21 16:05 ipatalas