vscode-styled-components
vscode-styled-components copied to clipboard
Complete property with semicolon when typing jsx style properites
Describe the bug (including copyable syntax)
Look at gif below.
Screenshot
Enable extension:
Disable extension:
To Reproduce
Just typing jsx style properites.
Expected behavior
Not complete property with semicolon in jsx style properites, or complete property with comma instead.
Build environment (please complete the following information):
- OS: Windows 10 20H2
- VSCode Version: 1.63.2
- Extension Version: v1.7.2
same issue
- Extension Version: v1.7.2
it's doable but I don't know if ill ever get around to this, would be good for someone to pick it up.
Setup Guide
https://github.com/styled-components/vscode-styled-components/blob/master/CONTRIBUTING.md
Command is here for adding semicolon. https://github.com/styled-components/vscode-styled-components/blob/master/src/insertColonCommand.ts
I think you'd somehow need to detect if you're in an object or not.
I would also inspect the completions passed here: https://github.com/microsoft/typescript-styled-plugin/blob/4f6ad2aae15098d74fd069d646a44ae368986af4/src/_language-service.ts#L259
they may have their own auto suggest which we could use instead of adding semcolons
Facing the same issue when trying to set properties via the css
function. I'll have to disable the extension until this is fixed. Would be cool if there was an option to disable this behavior too.