sublimelsp / LSP-tailwindcss

Tailwind css support for Sublime's LSP plugin
MIT License
55 stars 6 forks source link

add support tailwind.config.cjs #15

Closed andikasputra closed 3 years ago

andikasputra commented 3 years ago

when working with svelte kit, they use "type": "module" in package.json. So, tailwind.config.cjs used instead of tailwind.config.js

predragnikolic commented 3 years ago

Thanks for submitting the PR.

Recently I discovered that the tailwindcss language server can discover multiple config files. https://github.com/tailwindlabs/tailwindcss-intellisense/blob/766a5d533dcb68640ce6b3270488f6701dd1173d/packages/vscode-tailwindcss/src/extension.ts#L40

Your PR will only fix one case. The tailwindcss language server can work if the config file is in a nested folder, but currently this plugin can only work if the tailwind config file is at the root of the folder, which is not ideal. (the LSP-tailwindcss plugin should also work if the config file is in a nested folder).

So I do not think that I will merge this now, because I would like a more bullet proof solution. But thanks for the initiative!

I will try to find some time to fix it this weekend (hopefully) :)

predragnikolic commented 3 years ago

This has been fixed and I made a release so it will be on Package Control soon - https://github.com/sublimelsp/LSP-tailwindcss/releases/tag/0.0.2 @kidnaa