[scss] instellisense doesn't work when importing variables from separate file
- VSCode Version: 1.1.1
- OS Version: Windows 7
Steps to Reproduce:
- Create an scss file with a simple variable
- Create another scss file that is importing the previously created scss file
- Try to implement a class in the second scss file and try to use the variable in there. Intellisense is not working inside a class, just outside a class:


Yes, our css/less/sass supports are single file only.
I was looking for this and got told that visual studio 2013 ever support this with additional comments:
https://blogs.msdn.microsoft.com/webdev/2013/11/06/a-high-value-undocumented-less-editor-feature-in-visual-studio/
It would be gorgeous if vscode inherit it. :)
Definitely +1 for this feature request! :+1:
+1
This is a must have feature for me. Every time I sit down to do my LESS work, I always end up switching back to Visual Studio so I can get the references for my variables and mixins. This needs to happen.
What about suggest variables from another opened file also? Or from files in the same directory. not only from linked ones. Or you know how looks for example directory with LESS files in Bootstrap 3... One main file with @includes of partial LESS files one of them with only variables and one subdirectory with mixins. So best behaviour should be to intelligently scan for other LESS files and includes and suggest variables this way.
Similar thingss are discussed in these issues https://github.com/Microsoft/vscode/issues/10762 and https://github.com/Microsoft/vscode/issues/6820
Both popular editors - Brackets and Sublime - support this via extensions.
- Brackets have LESShints.
- Sublime have SublimeAllAutocomplete
I just want to switch to VSCODE and lack of this functionality is pretty big blocker for me. I'm really surprised that this essential feature for front-end developers is still missing in so clever editor which vscode surely is. If you are familiar with Bootstrap you know how annoying is write repetitively e.g. '@line-height-computed' or '@grid-gutter-width' or any other variables again and again...
And what about to change title to contain also LESS and SCSS key words and reflect what we are looking for: something like: [scss] Add feature to instellisense to support Less/Sass cross file variable resolution and also variables from imported separate files or something like that.
How can I support this feature to be done? It should have higher priority. Yeah I find way in CONTRIBUTING.md
If you find your issue already exists, make relevant comments and add your reaction. Use a reaction in place of a "+1" comment. :+1: - upvote :-1: - downvote
So please you all front-end developers who want to use vscode and LESS/SASS please upvote by adding a :+1: reaction to the first post.
In a mean time Im going back to Brackets.
Firsly, @mattez, thank you for your interest. I think developers would like to add all requested features, but now it is impossible.
From @bpasero
Since we are a small team of developers, there is only so many feature requests and issues we can work on for one milestone. Nevertheless we always welcome pull requests and are happy to accept them if they meet our quality standards.
I'm not an employee of Microsoft, but I write extensions for this editor and I'm interested in the evolution of this editor.
I also use Less in their projects and even wrote a book about Less in my native language. I am also waiting for this functionality.
And now let's talk about functionality. Please, @aeschli, tell me, this functionality should be implemented in vscode-css-languageservice or as separate extension? (If also think about the suggestions for mixins and their parameters)
If as an extension, then I'm ready to create it. Anytime Soon.
Thank you @mrmlnc for your support. I'm really happy to see fist attempt to begun to solve this specifically. Hurray.
I know nothing about development strategies, but don't you can start on developing extension which could then later can be integrated to and became part of vscode?
BTW I have not tested jet (I'm more LESS user) but there is SASS extension already. But in general as a user I prefer "implemented" solution or very very good writen :) extension witch no interfere with existing features of vscode mainly it's IntelliSense.
And there is such a big part in default-settings.json dedicated to SASS and LESS so it looks like vscode want to support these languages deeply.
Hi @mrmlnc have you got any hints from @aeschli ?
@mattez, nope, but I'm working on an extension for Less (Sass later) 🌵. Think will be ready tomorrow. Will Intellisense support for variables and mixins (with nesting) from all imported files.
@towertop, @tgrosh, @mattez, please, help me testing vscode-less extension ❤️.
@mrmlnc I just installed you brand new hot extension. IT JUST WORKS so far. So I'm going to use it on a real projects. I looks gr8. Thank you very much @mrmlnc .
This would come in very handy, especially if we as VS Code are going to switch our styling to SCSS #8589. It would already help us today on our website (I've ran into much of the same pain as mentioned here).
@bgashler1, I planned SCSS IntelliSense for next week. Now I want to identify problems in the current solution (performance [important], information in popup's and more cases).
UPD [24.10.2016]: Task moved to this week. Sorry 🐼
@netopolit, @mattez, @bgashler1, @druellan, @marvinhagemeister,
Please, help me test testing vscode-scss extension ❤️.
Seems to work pretty well!

In fact, too well:

Perhaps a way to ignore a path is needed. Also, not sure if the "implicitly" is so useful that worth taking up space for the path and the variable contents.
Another thing I noticed, and this can be a VScode problem:

If you write the property, hit ctrl+space and then you keep typing, the autocomplete is not refreshed.
It seems to be working fine.
I'm getting this in the panel:
[Error - 10:27:01 AM] Request textDocument/hover failed. Message: Request textDocument/hover failed with message: Cannot read property 'type' of null Code: -32603
Another thing, I'm getting contextual help on every item inside a mixin:
