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

Incorrect implicitly label for partial files #99

Closed
mrmlnc opened this issue Dec 5, 2019 · 2 comments
Closed

Incorrect implicitly label for partial files #99

mrmlnc opened this issue Dec 5, 2019 · 2 comments
Milestone

Comments

@mrmlnc
Copy link
Owner

mrmlnc commented Dec 5, 2019

  • VS Code Version: 1.40.2
  • SCSS IntelliSense Version: 0.8.1+
  • Operating System: Windows

Reproducible Case:

// _provider.scss
@mixin gradient-striped($color: rgba(255, 255, 255, .15), $angle: 45deg) {
  background-image: -webkit-linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent);
  background-image: -o-linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent);
  background-image: linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent);
}

.test1 {
  @include gradient-striped;
  background-size: 40px 40px;
}

// test.scss
@use "provider" as p;

.test2 {
  @include p.gradient-striped;
  background-size: 40px 40px;
}

Steps to Reproduce:

  1. Open the test.scss file;
  2. Hover the gradient-striped node; The lettering would be @import "_provider.scss";; Go to the definition;
  3. Save the _provider.scss file;
  4. Back to the test.scss file
  5. Hover the gradient-striped node; The lettering would be @import "_provider.scss"; (implicitly);
@mrmlnc
Copy link
Owner Author

mrmlnc commented Dec 6, 2019

We need to use ls.findDocumentLinks2 to fix the problem at the root. To do this, we must switch to the URI instead of the paths in the providers, parser and scanner.

https://github.com/microsoft/vscode-css-languageservice/blob/2a87ef7ac2ce9eb4db3583e38a98bbac2c6464bf/src/services/scssNavigation.ts#L48

@mrmlnc mrmlnc added this to the 0.9.0 milestone Dec 8, 2019
@mrmlnc mrmlnc closed this as completed Jan 4, 2020
@mrmlnc mrmlnc reopened this Jan 4, 2020
@mrmlnc
Copy link
Owner Author

mrmlnc commented Jan 4, 2020

Must be fixed by 0.9.0.

@mrmlnc mrmlnc closed this as completed Jan 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant