0

How to make vim syntastic to read the imported files? Currently my scss directory files like this:

scss/
----custom.scss
----style.scss
----variable.scss

I import all the scss file into style.scss, so the style.scss contains:

@import 'variable';
@import 'custom';

That's fine, then in my variable.scss, e.g I make a variable of color $primary-color: #3298df;. Then in my custom.scss contains:

a, p {
    color: $primary-color;
    font-weight: bold;
}

The vim syntastic will notify me an error saying that Undefined variable: $primary-color, but if I build the scss file and run in the browser, it works fine.

Any clue for the vim syntastic configuration ?

sudo bangbang
  • 27,127
  • 11
  • 75
  • 77
Ferry
  • 340
  • 2
  • 12
  • It's a "cart before the horse" situation - you just need to reorder your `import` lines so the variables are called first, before they're used. – Jon Uleis Dec 22 '16 at 18:47
  • @JonUleis The vim syntastic still notifies me an error. Pardon me before, actually in my `style.scss` I have ordered files that contain variables or any mixin in the top first before `import` another scss files. – Ferry Dec 22 '16 at 18:52

0 Answers0