auto complete css dont work prety fine
Thanks in advance for your bug report!
- [X] Have you reproduced issue in safe mode?
- [x] Have you used the debugging guide to try to resolve the issue?
- [X] Have you checked our FAQs to make sure your question isn't answered there?
- [X] Have you checked to make sure your issue does not already exist?
- [X] Have you checked you are on the latest release of Pulsar?
What happened?
the list of the autocomplete popup show only 1 item
Pulsar version
1.116
Which OS does this happen on?
🪟 Windows
OS details
windows 10
Which CPU architecture are you running this on?
x86_64/AMD64
What steps are needed to reproduce this?
With a new default install When i try to add the property in the 1st of the list, its dont show the liste
- in the p block its no working,
- in the div block its no working
- in the last block is working
sample code: p { padding-right: 0px; background-color: red; } div { display: block; padding-right: 0px; } span { display: block; padding-right: 0px; }
Additional Information:
No bug whith pulsar 1.105
Sadly, I think this is a side-effect of the new Tree-sitter CSS grammar. I described some of its difficulties in #601 — it makes bad guesses about how to do completions in situations where the tree is not syntactically valid because the user is still typing. I think that tree-sitter-css itself should improve to be better at this sort of thing, but in the meantime there's not much we can do except use a different system internally to make better guesses about what the user is typing.
You didn't notice this problem in 1.105 because we hadn't started using the new grammars. That means that you have a decent workaround: try one of the config changes in #883 (under “I want to go back to the old highlighting!"). I think you'll have to revert to the TextMate grammar, but maybe the other config block will work instead.
This is something that should be more actively on our radar, so I'll either create an issue to track this or change this issue to include more context about the problem.
This is what I mean:
I'm almost certainly about to type a property — something that starts with padding — but tree-sitter-css thinks it's a tag name. And though it technically could end up as a tag name, autocomplete-css should resolve that ambiguity by offering me properties and tag names that match.
Once the colon is present, tree-sitter-css now thinks that pad is likely part of a property. At this point, autocomplete-css will suggest property completions, but it's a bit annoying to have to type the colon first, so this isn't a reasonable workaround.