Open trydofor opened 2 weeks ago
Un, interesting. I don't actually use named catalogs, but yeah I think this would be a nice feature. PR welcome if anyone wants to work on it
I cloned this repo, and tried to the following,
predefine 10 colors in the config, and get colors by the catalog index,
0
- for the default
catalogs1...
- for named catalogs by index#000000
- for the IndexOutOfBounds"contributes": {
"configuration": {
+ "pnpmCatalogLens.colors": {
+ "type": "array",
+ "default": ["#f69220", "#845EC2", "#D65DB1", "#2C73D2", "#0089BA", "#008F7A", "#00C7AD", "#F3C5FF", "#00C0FF", "#E6E885"],
+ "description": "text colors to diff catalogs. the first for default, #000000 for IndexOutOfBounds",
+ "items": {
+ "type": "string"
+ }
}
const configColors = workspace.getConfiguration('pnpmCatalogLens').get('colors',['#f69220'])
const decorationsOverrideMap = new Map<string, ShallowRef<DecorationOptions[]>>();
and finally, i give up, it's hard for me to impl this feature now, i'v wrote bad smelling code :)
Clear and concise description of the problem
it would be great if catalog with different color to distinguish them.
Suggested solution
color can auto calculate or manually set
Alternative
No response
Additional context
No response
Validations