gencer / SCSS-Everywhere

A Visual Studio Code extension that provides CSS class and ID atttribute completion with incremental build and usage explorer for the HTML class attribute based on the CSS/Template files in your workspace. Also supports React's className attribute.
https://marketplace.visualstudio.com/items?itemName=gencer.html-slim-scss-css-class-completion
MIT License
24 stars 9 forks source link

[Question] Does excludeGlobPattern respect files.exclude? #41

Open willstocks opened 5 years ago

willstocks commented 5 years ago

Hello, I noticed there's an excludeGlobPattern which is defaulted to node_modules however I'm unclear on how to format this for other folders that need to be excluded. Is it comma separated, space separated, declared as an array in settings.json?

Also, does excludeGlobPattern respect the existing defined files.exclude patterns that have been defined?

Most other exclude or ignoresettings have an "add item" button and add a line per item, which then appears to be stored as an array. But in this case it appears to be a single line (I'm assuming comma separated?)

gencer commented 5 years ago

As you can see here:

https://github.com/gencer/HTML-Slim-CSS-SCSS-Class-Completion/blob/4a46d2f93c96f72c3fab52bc1fd661374d9b47c2/src/extension.ts#L297

It does not respect files.exclude. It is a glob pattern. Similar to regex. Each pattern separated by ;.

Samples:

  // match all files
  "**/*"

  // except for js files in the foo/ directory
  "!foo/*.js"

  // unless it's foo/bar.js
  "foo/bar.js"
willstocks commented 5 years ago

Ahhh OK it's ; separated! Apologies, I'm not personally familiar with working with glob patterns specifically 😄

It might be worthwhile adding this info to either the readme or in the setting description to mention that they are ; separated, as it's a little unclear if you're not 100% familiar!

gencer commented 5 years ago

Sorry for late reply, I forgot to return back here. I keep this issue open,

  1. I will update README. From top to bottom. It needs to be updated and trimmed.
  2. I will probably add support for global files.exclude.
  3. Also will work on this: #39

Gencer.