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

[Bug] variables sorting does not consider numbers #120

Open
massimo-cassandro opened this issue Sep 24, 2024 · 6 comments
Open

[Bug] variables sorting does not consider numbers #120

massimo-cassandro opened this issue Sep 24, 2024 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@massimo-cassandro
Copy link

Describe the bug
Variables are sorted alphabetically and numbers suffix or prefix are not in the right sequence

Screenshot 2024-09-24 alle 12 11 03

Expected behavior
Variable must be sorted in natural order:

--var-1
--var-2
...
--var-10
--var-11

Details (please complete the following information):

  • OS: OSX Ventura 13.7
  • VSCode version 1.93.1
  • Extension version 2.6.4
@massimo-cassandro massimo-cassandro added the bug Something isn't working label Sep 24, 2024
@phoenisx
Copy link
Contributor

Try using cssvar.disableSort extension setting.

@massimo-cassandro
Copy link
Author

I tried, but it doesn't solve the issue

@phoenisx
Copy link
Contributor

Screenshot from 2024-09-24 22-50-48

It's working fine for me.
Did u restart/reload your VSCode Window after changing the extension settings?

@massimo-cassandro
Copy link
Author

You are right: after reloading my vscode window, the extension seems to work as expected.

But this leads to another problem: I usually load custom properties from more than one file and when I disable sorting, they get merged in an unpredictable way:

Screenshot_2024-09-25_alle_14_18_35

@phoenisx
Copy link
Contributor

Agreed! That needs to be fixed.
I have low bandwidth.
I'll keep this issue open to work on this later.

If you are interested, care to open a PR?

@massimo-cassandro
Copy link
Author

If you are interested, care to open a PR?

I'd like to, but I dont know if I will have time.
Anyway I'll give it a look

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants