pucelle / vscode-css-navigation

Allowing Go to definition from HTML to CSS, or Find References from CSS to HTML.
https://marketplace.visualstudio.com/items?itemName=pucelle.vscode-css-navigation
MIT License
64 stars 8 forks source link

Ability to include a specific CSS file #43

Closed kanlukasz closed 3 years ago

kanlukasz commented 3 years ago

Hello

I would like to get Class Completion from the original Bootstrap framework CSS file. Bootstrap files are in node_module directory. Is it possible to include bootstrap files to get class autocompletion in my project?

pucelle commented 3 years ago

Hi, try include the directory with a glob expression in alwaysIncludeGlobPatterns option, like **/bootstrap/**. Otherwise, importing bootstrap files from your css codes like @import bootstrap/xxx will also force it work. Any other problems, welcomes to feedback.

tuan-lm commented 3 years ago

I think this feature is not work. For example i'm using a framwork called "vuetify" and it's files in node_module directory also. My setting as follow :

"CSSNavigation.alwaysIncludeGlobPatterns": [
        "**/vuetify/**",
    ],

But 1 weird thing, if i open the file vuetify.css(which is in vuetify/dist directory ) in the editor then it actually work, but i can't manually go to node_modules and open it everytime i have to work.

pucelle commented 3 years ago

This should be a bug, I will check it later.

kanlukasz commented 3 years ago

https://github.com/pucelle/vscode-css-navigation/issues/44 can be related

pucelle commented 3 years ago

Should be same with #44.