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

[scss] Ctrl+Click is not working when file name has a suffix with a dot #121586

Closed
ghost opened this issue Apr 18, 2021 · 5 comments · Fixed by microsoft/vscode-css-languageservice#241
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug css-less-scss Issues and items concerning CSS,Less,SCSS styling help wanted Issues identified as good community contribution opportunities
Milestone

Comments

@ghost
Copy link

ghost commented Apr 18, 2021

  • VS Code Version: 1.55.2
  • OS Version: Windows 10 x64 10.0.19042

Steps to Reproduce:

  1. Create 3 empty files: index.scss, theme.scss and component.theme.scss
  2. Paste next snippet to index.scss
    @use './theme' as *;
    @import './theme';
    
    @use './component.theme' as *;
    @import './component.theme';
    
  3. Try open ./component.theme via Ctrl+Click
  4. Note, Ctrl+Click on ./theme is working
@vscodebot
Copy link

vscodebot bot commented Apr 18, 2021

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@tymsai
Copy link

tymsai commented Apr 18, 2021

yeah I also got a error of a non existing file;
The problem is in the naming of the file
use the below given code it's working :

@use './theme' as *;
@import './theme';

@use './component.theme.scss' as *;
@import './component.theme';

i hope it solved ur issue

@ghost
Copy link
Author

ghost commented Apr 19, 2021

@tymsai Thanks, yes, I saw that it works with .scss, but it should also work without it, like other examples

@aeschli aeschli changed the title [SCSS] Ctrl+Click is not working when file name has a suffix with a dot [scss] Ctrl+Click is not working when file name has a suffix with a dot Apr 19, 2021
@aeschli aeschli added css-less-scss Issues and items concerning CSS,Less,SCSS styling bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities labels Apr 19, 2021
@aeschli aeschli added this to the Backlog milestone Apr 19, 2021
@aeschli
Copy link
Contributor

aeschli commented Apr 19, 2021

If someone is interested in looking into i:. The logic to resolve the file name is in https://github.com/microsoft/vscode-css-languageservice/blob/3ab3d91a81bcebd9e8566e2cf7cad454188e8324/src/services/scssNavigation.ts#L27

@jeanp413
Copy link
Contributor

jeanp413 commented May 3, 2021

Created a PR microsoft/vscode-css-languageservice#241 fixing this

@github-actions github-actions bot locked and limited conversation to collaborators Jul 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug css-less-scss Issues and items concerning CSS,Less,SCSS styling help wanted Issues identified as good community contribution opportunities
Projects
None yet
3 participants