Closed itmecho closed 11 months ago
Apologies for getting back to you late. You can turn off camelCase
option (false
) and the class names will be returned as is. Please see the docs for camelCase option and how to set it depending on what you are using for lsp setup.
Ah my bad! I saw in the table that false
is marked as the default so I thought that was the behaviour I was getting. Setting it to false
manually does the trick!
Does that mean that false
isn't the default?
Oh, there was a typo in the docs. true
is the actual default setting. I've updated the docs to reflect it. Thanks for surfacing!
Is there any way this could support
PascalCase
class names? The codebase at my company has a lot of CSS modules that contain class names that match the components they style, i.e.<Task className={styles.Task}>...</Task>
.Currently, the lsp returns the class in camelCase which resolves to undefined and causes the element to have no
className
attribute.For example:![image](https://github.com/antonk52/cssmodules-language-server/assets/8384983/79886dc0-063f-4c25-aae1-51e5b2168585)
Choosing the
classOne
option results in<p>Should be red</p>
being rendered