willofindie / vscode-cssvar

VSCode extension to support CSS Variables Intellisense
https://marketplace.visualstudio.com/items?itemName=phoenisx.cssvar
MIT License
252 stars 4 forks source link

Does not work on multi root workspaces. #32

Closed Esteban-Rocha closed 2 years ago

Esteban-Rocha commented 2 years ago

Thanks for the EXT. very handy.

That said, I believe it does not work on multi-root workspaces. (@see: VsCode Multi-root Workspaces )e.g.:

image

To which I tried all the possible combinations and the only way the EXT. does not complain is the following syntax:

my-project.code-workspace

{
  "folders": [
    {
      "path": "/rootA"
    },
    {
      "path": "/rootB"
    }
  ],
  "settings": {
    "cssvar.files": {
      "path": "${workspaceFolder}/.../styles/base/pollen/colors.scss"
    }
  }
}

This also works on your main user-settings.json to remove the notification error popup on vscode. But it still makes the EXT to provide no intellisense/autocompletions.

With that explained, I'll love to ask if I may:

Thank you.

Best,

phoenisx commented 2 years ago

Thanks, @Esteban-Rocha for opening this issue.

Support for Multi Root workspaces is broken as of now. I need to revisit the code for a fix 👍🏾

Esteban-Rocha commented 2 years ago

Thanks for the heads-up @phoenisx 👍🏻

adamghowiba commented 2 years ago

@phoenisx Any updates on this really would love to use this with my monorepos?

phoenisx commented 2 years ago

Hi @Esteban-Rocha, @TechnoPvP

Apologies for the delay, was a bit burned out from coding 😅

Anyways, I have started to work on this again and would love to push this change by 18th Jul. I wanted to know your use cases and how you use this plugin in a Multi Root project.

Please help me answer the following questions to add support for them:

The problem I am trying to solve here is, how to support Multi Root projects for CSS variables because every user can have a different way of setting up their projects.

I don't want to make this project complicated and wanted to understand which kind of setup would fit most of the users? Any ideas?

phoenisx commented 2 years ago

Or should I just populate all the CSS variables from each root into a single dropdown across folders, irrespective of which active root a dev is working on?

Just thinking out loud here 🤔 Would love to get more opinions here

phoenisx commented 2 years ago

Hi Folks!!

Multi Root Workspace support has been added to this extension (v1.5.0). Apologies for the delay.

Please check Examples for reference.

Also, to keep things simple, each root folder is kept isolated, which means CSS variables present in one root folder won't be accessible in another root folder.

If you need IntelliSense support for global CSS variables list from all root folders accessible to every file irrespective of which root folder they belong, please raise a separate ticket 🙇🏾

Esteban-Rocha commented 2 years ago

@phoenisx Hey, hope you're doing better, thanks a lot for this, I wasn't able to give you some feedback as I had been a bit busy. But I'll test it for sure, and I think it covers most scenarios.

Thanks again, take care.