material-extensions / vscode-material-icon-theme

Available on the VSCode Marketplace
https://marketplace.visualstudio.com/items?itemName=PKief.material-icon-theme
MIT License
2.09k stars 629 forks source link

[Icon Request] nest-entity #2330

Open GabrielFreitasP opened 5 months ago

GabrielFreitasP commented 5 months ago

Icon Type

File Names

Graphic ideas Please refer to this icon and change the color to any color that does not already exist.

Additional context Many projects use the files file.dto.ts and file.entity.ts when using Nest.js.

lucas-labs commented 4 months ago

Although it's not exactly what you were asking for, you can achieve this by using the custom clones functionality.

You can now choose an icon you like and "clone it", assign it to the file extension or file name you want, while changing the color to any color you like, using the new custom clones feature in your vscode user settings (or workspace settings).

Usage example (click me to expand): ```jsonc // settings.json { // ... "material-icon-theme.files.customClones": [ { "base": "nest", "color": "lime-500", "fileExtensions": ["dto.ts"], "name": "nest-dto" }, ... ], // ... } ```

Result:

custom clone

Does this suit your needs?

mallowigi commented 4 months ago

@lucas-labs True but this is a default that most nestjs users will be likely to use, so this should be in the defaults.

lucas-labs commented 4 months ago

@mallowigi I haven't used nestjs since a long time ago. Is there any other file naming convention that we are missing besides dto?

PKief commented 4 months ago

@lucas-labs @mallowigi There were some suggestions from @bart-krakowski in https://github.com/material-extensions/vscode-material-icon-theme/pull/1532. But to be honest, I don't think that we should have a nest icon for *.config.ts, *.util.ts, *.enum.ts, *.type.ts or *.interface.ts, as these files are still too generic, even in a Nest.js project.

mallowigi commented 4 months ago

@lucas-labs @PKief I am a NestJS expert so in my project I have a "NestJS Pack" like you do, in which I reference the following extensions:

As you can see one of the great things in Nest is the separation of concerns of everything. Therefore having the same icons but with different colors helps greatly during NestJS development.

Here's an example in our project: CleanShot 2024-07-08 at 11 47 59

I agree that a lot of these extensions are related to a "flavor" of NestJS projects. Not all NestJS projects use GraphQL, Passport, Zod or Bull. But in general if the NestJS pack is on, it's a great idea to group everything Nest related within the default bundles rather than have all developers define their own associations.