Skip to content

Allow autocompletion when using += #466

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

Closed
wants to merge 1 commit into from

Conversation

ModProg
Copy link

@ModProg ModProg commented Jan 16, 2022

This allows to use the autocompletion when concatinating strings using
+=.

This allows to use autocompletion when e.g. writing conditional styling
this way:

var className = "text-red-50";
if (shouldBeRounded){
    className += "rounded";
}

This allows to use the autocompletion when concatinating strings using
+=.

This allows to use autocompletion when e.g. writing conditional styling
this way:

```js
var className = "text-red-50";
if (shouldBeRounded){
    className += "rounded";
}
```
@bradlc
Copy link
Contributor

bradlc commented Jan 19, 2022

Please see #465 (comment)

@bradlc bradlc closed this Jan 19, 2022
@ModProg
Copy link
Author

ModProg commented Jan 20, 2022

For anyone coming across this needing this as regex you can use:

'(?:classes|class)\\s*\\+?=\\s*"([^"]*)',
'(?:classes|class)\\s*\\+?=\\s*`([^`]*)',
"(?:classes|class)\\s*\\+?=\\s*'([^']*)",

Replace classes|class with all the variable names you want to use.

Still would have considered this a small enough change to be added in the code IMO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants