Skip to content
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

Files compile fine, but VSCode doesn't autocomplete and shows errors #114

Closed
laoqiu233 opened this issue Mar 24, 2021 · 5 comments
Closed

Comments

@laoqiu233
Copy link

Describe the bug
I'm using LESS as a preprocessor, I've added an import in a file like this @import (reference) '../base.module.less' (also tried without reference tag), and the auto-completion for the classes in this file is gone.
I've read #113 and it still doesn't solve my problem, since the person who created the issue is using sass and I'm using less.

To Reproduce
I'm not really sure how this happened, I just added the line to import and the IntelliSense is gone! I've uploaded the code to a temporary repo so maybe someone could read the code and find out what's wrong with it.
https://github.com/laoqiu233/for_issue

Expected behavior
VSCode should provide IntelliSense and not throw errors.

Screenshots
The LESS file with the line
The LESS file with the line

An empty style object, but the code compiles and works fine
An empty style object, but the code compiles and works fine

VSCode complains and shows errors
VSCode complains and shows errors

Commented out the line
Commented out the line

Works fine after deleting the line
Works fine after deleting the line

Desktop (please complete the following information):

  • OS: Windows 10 64bit
  • Browser: Chrome
  • Version 89.0.4389.90
@laoqiu233 laoqiu233 changed the title Files compiles fine, but VSCode doesn't autocomplete and shows errors Files compile fine, but VSCode doesn't autocomplete and shows errors Mar 24, 2021
@wzono
Copy link

wzono commented Apr 19, 2021

same problems. need helps...

@mrmckeb
Copy link
Owner

mrmckeb commented Apr 22, 2021

Thanks for the reproduction, @laoqiu233 - it really helped! And, sorry for the very slow reply.

This is a known issue with Less, which can be resolved by adding (css):

- @import url('https://fonts.googleapis.com/css2?family=Monoton&family=Montserrat:ital,wght@0,100;0,200;0,300;0,400;0,500;1,100;1,200;1,300;1,400;1,500&display=swap');
+ @import (css) url('https://fonts.googleapis.com/css2?family=Monoton&family=Montserrat:ital,wght@0,100;0,200;0,300;0,400;0,500;1,100;1,200;1,300;1,400;1,500&display=swap');

I found the issue here for reference: less/less.js#3188

I hope that helps!

@wingsico if you still have an issue, please raise a new issue with a small reproduction and I'll take a look ASAP :)

@mrmckeb mrmckeb closed this as completed Apr 22, 2021
@wzono
Copy link

wzono commented Apr 26, 2021

Thanks for the reproduction, @laoqiu233 - it really helped! And, sorry for the very slow reply.

This is a known issue with Less, which can be resolved by adding (css):

- @import url('https://fonts.googleapis.com/css2?family=Monoton&family=Montserrat:ital,wght@0,100;0,200;0,300;0,400;0,500;1,100;1,200;1,300;1,400;1,500&display=swap');
+ @import (css) url('https://fonts.googleapis.com/css2?family=Monoton&family=Montserrat:ital,wght@0,100;0,200;0,300;0,400;0,500;1,100;1,200;1,300;1,400;1,500&display=swap');

I found the issue here for reference: less/less.js#3188

I hope that helps!

@wingsico if you still have an issue, please raise a new issue with a small reproduction and I'll take a look ASAP :)

Ok, the same problems still exist. I will raise a new issue for it.

@mrmckeb
Copy link
Owner

mrmckeb commented Apr 28, 2021

Thanks @wingsico. This was definitely the fix for the reproduction in this issue, I tested multiple times. When you raise an issue, I can help sort out your issue too!

@wzono
Copy link

wzono commented May 6, 2021

Thanks @wingsico. This was definitely the fix for the reproduction in this issue, I tested multiple times. When you raise an issue, I can help sort out your issue too!

A new issue raised here. #122
This bug caused by other problems, but behaves the same way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants