-
Notifications
You must be signed in to change notification settings - Fork 29.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[scss] instellisense doesn't work when importing variables from separate file #6734
Comments
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: It would be gorgeous if vscode inherit it. :) |
Definitely +1 for this feature request! 👍 |
+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. |
Both popular editors - Brackets and Sublime - support this via extensions.
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. And what about to change title to contain also LESS and SCSS key words and reflect what we are looking for: something like: |
How can I support this feature to be done? It should have higher priority.
So please you all front-end developers who want to use vscode and LESS/SASS please upvote by adding a 👍 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.
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 If as an extension, then I'm ready to create it. Anytime Soon. |
Thank you @mrmlnc for your support. 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. 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. |
@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 ❤️. |
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 ❤️. |
It seems to be working fine. I'm getting this in the panel:
|
Thanks for help! I really appreciate this. I have repository for this plugin (https://github.com/mrmlnc/vscode-scss) and progress over your comments you can check there (I created issues for your comments). |
+1 |
vscode-scss just works perfectly! |
I'd love to see a merge into css-language-service, as then I'd assume there would be support across projects for things like CSS custom properties / variables, which are very much the future. |
SCSS variables and CSS variables are very different in scopes. So let's not confuse things here. Accurate CSS variable completions require understanding of the DOM tree since CSS variables are scoped based on DOM structure. On the other hand for SCSS variables/mixins/functions, it's possible to analyze them, resolve dependencies and output suggestions accurately. However that would take quite some effort. So my suggestion would be to use https://github.com/mrmlnc/vscode-scss for now, which scans through your working dir and outputs completions globally. Anyway in SCSS variables are global by default. |
Issues have been created stating that the same thing happens for the less filetypes, but are closed as duplicate referencing this issue. |
I hope anyone continue develop vscode-scss extension Currently vscode does not have the scss extension good enough and is still developing... |
Glad to hear that it's making its way into #83930 It's making SCSS development less ideal following conventions like externalizing variables and code completion of functions. The extensions that are recommended just don't seem to be cutting it! |
Just hope it's also making its way into there for Less and not just scss. |
I helped vscode-scss with its development for a bit. I prepared a new release, 0.8.0 and @mrmlnc could release it to Market Place. During my test I think vscode-scss works pretty well. So instead of copying over its features I helped with its development. Over the time we might consider adding multiple file support in VS Code's CSS/SCSS/Less support, but we don't want to commit to it yet. For Less, you can checkout vscode-less, by the awesome @mrmlnc as well. |
We try to keep VS Code lean and we think the functionality you're asking for is great for a VS Code extension. Maybe you can already find one that suits you in the VS Code Marketplace. Just in case, in a few simple steps you can get started writing your own extension. See also our issue reporting guidelines. Happy Coding! |
To verify, install the vscode-scss extenssion |
Steps to Reproduce:
The text was updated successfully, but these errors were encountered: