BeastCode / VSCode-Angular-TypeScript-Snippets

Visual Studio Code TypeScript snippets (TypeScript, Html, Angular Material, Flex Layout, ngRx, RxJS & Testing) for Angular 17
https://marketplace.visualstudio.com/items?itemName=Mikael.Angular-BeastCode
MIT License
92 stars 49 forks source link

Default file extensions #3

Closed cgatian closed 7 years ago

cgatian commented 7 years ago

I don't think this is possible with VS Code, but I could be wrong.

In my component I always use scss for the template. It would be nice if these could be configured in workspace settings something like:

{
   beastcode.defaultStyleUrlExtension: 'scss'
}
cgatian commented 7 years ago

If it's something we can't do now. I could see opening up an issue on VS Code for it, because I could see pulling settings from TsLint.

For example if we could read the tslint.json file, and get the component selector

"component-selector": [true, "element", "my", "kebab-case"],

We could then default components with "my-" in the snippet.

BeastCode commented 7 years ago

I don't see a good solution for it right now, but they keep adding more and more so maybe we should request being able to pull in variables from a config file.

A temporary solution could be to create "ng-component-scss" snippet, till a better solution exist. I could also add a tab stop just before "css" to make it easy to edit.

cgatian commented 7 years ago

I trolled the VSCode issues and didn't see a feature request for this. Maybe it's only possible if you create an actual plugin? Going to do some more research on this. Closing for now.