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 completion variable names are file-scoped inconsistently #166203

Closed
allan2 opened this issue Nov 12, 2022 · 4 comments
Closed

Color completion variable names are file-scoped inconsistently #166203

allan2 opened this issue Nov 12, 2022 · 4 comments
Assignees

Comments

@allan2
Copy link

allan2 commented Nov 12, 2022

This issue is for color completion having inconsistent behaviour when it comes to suggesting variable names from other files.
#166201, #166195, and this issue are probably all afflicted by the handling of non-hex variables.

color-completion-5-file-scope
File A autocompletion sometimes suggests variables from File B (the list can be reset, described in #166201)
File B autocompletion never suggests variables from File A.

Example code is here https://github.com/allan2/vs-code-css-color-issue

@aeschli
Copy link
Contributor

aeschli commented Nov 14, 2022

The CSS language support does not work across files. It only looks at the content of the current file and only knows about variables defined in the current file.

#47331 is the request

@aeschli aeschli closed this as completed Nov 14, 2022
@allan2
Copy link
Author

allan2 commented Nov 14, 2022

@aeschli could you reopen?

This is still a bug.

Variables in other files are leaking today. Look at how $blue in File B shows up in File A. I included an animation in my first post.

@aeschli
Copy link
Contributor

aeschli commented Nov 15, 2022

It's a textual completion proposal. These are offered if there are no better proposals
@jrieken I assume these are gathered from all open documents of the same language mode?

@allan2 Isn't it a good thing to have such proposals? It might be what you need. Code completion is about helping the user to type. Some proposals are useful, some are not. In the end it's the user to decide which proposal to pick.

@allan2
Copy link
Author

allan2 commented Nov 30, 2022

@aeschli I understand. It is good to have these autocompletion suggestions.

I opened this bug because under specific conditions, proposals from variables in File B show up in File A but not the other way around.

I think this is a bug related to hex colours.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants