-
Notifications
You must be signed in to change notification settings - Fork 117
Autocomplete when writing % and then ; is broken #322
Autocomplete when writing % and then ; is broken #322
Comments
Thanks for raising @Sandstedt |
@Sandstedt It's happening on older versions, which makes me think VSCode has changed something rather than this extension. But if you're able to get it working on a specific version please let me know. So it looks like accepting on semicolon is a VSCode thing: The second question is why are the suggestions so terrible? The above screenshot is https://github.com/microsoft/typescript-styled-plugin/blob/0d3a95e27abc3eeaf5b56b8267a6b62b0a6af025/src/_language-service.ts#L117 Those 25 items are coming from the CSS language server's So at this point the UI is just displaying what the language server is sending, will need to go deeper.. Looking at the CSS Language server it seems to be recieving the correct tokens, we can see here that current word is correct: The input CSS we pass is this: :root{
padding: 3px;
max-width: 100%;
} The nodePath this generates is:
It looks like the CSS lang service sends everything back for |
So the CSS Language server is just returning everything back and VSCode isn't filtering them down by what was entered, nothing has changed in the extension so it could be a bug in the core, Maybe @aeschli could be of some assistance here? native CSS files aren't doing this and I understand they use the CSS Language service too, so will have to look there. I've ran the debugger over the native CSS version (following https://github.com/microsoft/vscode-css-languageservice#development) and the CSS Langauge Service sends back the same 23 items, so it seems to be a UI difference. Im out of options at this point apart from to just raise it with VSCode |
Raised: microsoft/vscode#134328
|
@Sandstedt (or anyone else affected) one thing that would help with this issue is if you’re able to reproduce it working in the correct state on an older version. Even if you can’t that would be useful to know too. This would help us know if the extension or VSCode itself broke. |
I'm having similar issues. Pressing return should end up with the current, correctly typed, line. Not ending up getting stuff added. autofail.1.mp4 |
If someone wants to fix this I would take a look at what the CSS Language server is doing. This may take a couple of windows so I would do as follows: (Using whatever windowing system your OS offers) Window 1Follow https://github.com/microsoft/vscode-css-languageservice#development and get setup with that, make sure the breakpoint is working like in the readme Window 2Follow https://github.com/styled-components/vscode-styled-components/blob/master/CONTRIBUTING.md#setting-up-for-development--debugging make sure the breakpoints are working here too. Then its a case of seeing why Window 1 works and Window 2 doesn't, it may be something different we send to the CSS Language service, maybe the positioning or offset is slightly off. If anyone has any time to look into this its appreciated |
If anybody wants to help fix this there’s a ticket open here microsoft/typescript-styled-plugin#155 The full context (including reproduction steps) is here: microsoft/vscode#134328 (comment) |
Fixed by: microsoft/typescript-styled-plugin#156 |
Great to hear! 🎉 Sorry didn't find/take any time to help out. Can I buy you a week's worth of coffee instead? 😅 (seriously, thank you so much!) |
Yeah totally, seriously, do you have a donation page @jasonwilliams? Would also want to support you! |
That’s very kind but I’m ok! I will use prereleases in future for beta testing |
Checked it out and reported back in #325 (comment) , thanks! |
Describe the bug (including copyable syntax)
When writing ex
max-width: 100%
IntelliSense starts auto-completing with a lot of nonsense, likenone
,100%
,auto
ormax-content
. If I now write a semi-colon,;
, this nonsense autocompleted word is attached to the end.Screenshot
2021-09-02-11-34-57.mp4
To Reproduce
max-width: 100%
and then write a semi-colonExpected behaviour
Not having any autocomplete at all here. Other units, like
px
andvh
works fine.Build environment (please complete the following information):
Context
This happen in an update sometime during the summer. Hasn't been a problem before.
The text was updated successfully, but these errors were encountered: