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

Color references not always working in Sublime Text #252

Closed
1 task
niksy opened this issue Oct 5, 2024 · 6 comments
Closed
1 task

Color references not always working in Sublime Text #252

niksy opened this issue Oct 5, 2024 · 6 comments

Comments

@niksy
Copy link
Contributor

niksy commented Oct 5, 2024

In which editor is this a problem?

Sublime Text

Describe the bug

When using only Sass LSP this is what code looks like:

Screenshot 2024-10-05 at 12 03 35

Compare it with when CSS LSP is also used for that same code:

Screenshot 2024-10-05 at 12 02 33

Notice how $hello variable gets it’s value recognized as color.

I tried setting enabling somesass.css.colors.enabled but it doesn’t do anything.

What's the expected result?

Colors are always recognized inside code.

Link to minimal reproducible example

No response

Participation

  • I am willing to submit a pull request for this issue.
@wkillerud
Copy link
Owner

Hi @niksy

I installed the latest LSP-sass and noticed the default setting somesass.scss.colors.includeFromCurrentDocument is set to false. The setting name is a bit imprecise, looking at it now. If you set it to true it will turn on color decorators for SCSS variable declarations and CSS colors in the open SCSS document.

This is with the setting set to true.

a variable declaration with a red color decorator next to it

@niksy
Copy link
Contributor Author

niksy commented Oct 7, 2024

Yes, I’ve been using defaults from https://wkillerud.github.io/some-sass/user-guide/settings.html where that value is mentioned as false by default. Is this not true? Should this be updated?

Where can we find full default values list? Is it this file: https://github.com/wkillerud/some-sass/blob/main/packages/language-services/src/configuration.ts

@wkillerud
Copy link
Owner

wkillerud commented Oct 7, 2024

Yes, I’ve been using defaults from https://wkillerud.github.io/some-sass/user-guide/settings.html where that value is mentioned as false by default. Is this not true? Should this be updated?

It's correct for the Visual Studio Code extension, which has different defaults from the language server itself. You highlight a good point though. Correct documentation of settings default values is missing for language server users. I opened #255

Where can we find full default values list? Is it this file: https://github.com/wkillerud/some-sass/blob/main/packages/language-services/src/configuration.ts

Yes, those are the default settings used by the language server.

@niksy
Copy link
Contributor Author

niksy commented Oct 7, 2024

Okay, this is it. Now I need to figure out how to disable Volar color implementation and leave only Some Sass active.

Screenshot 2024-10-07 at 20 06 24

@niksy
Copy link
Contributor Author

niksy commented Oct 10, 2024

Okay, closing this since this is now fixed, Volar related issue is a different beast :)

@niksy niksy closed this as completed Oct 10, 2024
@niksy
Copy link
Contributor Author

niksy commented Oct 18, 2024

Seems like it can be Sublime LSP issue: sublimelsp/LSP#2534

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

2 participants