ipatalas / vscode-postfix-ts

Postfix notation for TypeScript/Javascript - extension for VS Code
MIT License
159 stars 43 forks source link

Language-based context #46

Closed dpalay closed 2 years ago

dpalay commented 3 years ago

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.

ipatalas commented 3 years ago

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.