coc-tailwindcss
coc-tailwindcss copied to clipboard
new setup not working
Hi, I've been trying to setup the tailwindcss coc.nvim extension for a couple of days now but cannot get it to work. Could someone point me in the right direction? tailwind completion in vim would be awesome. I'm new to coc.nvim
I installed by :CocInstall coc-tailwindcss
I am using the example coc vimrc config
When trying to modify the html file in the tailwind playground repo and would expect to see some suggestions for tailwind's utility classes by nothing shows up. Project includes the tailwind.config.js
There are no obvious error messages anywhere and I don't know how to confirm if coc.nvim is working. Could I have missed some config somewhere?
CocInfo:
## versions
vim version: NVIM v0.4.3
node version: v12.15.0
coc.nvim version: 0.0.78-95e7ca8324
coc.nivm directory: ~\.vim\bundle\coc.nvim
term: undefined
platform: win32
## Output channel: tailwindcss-language-server
Can not reproduce, have you run yarn install
or npm install
in that repo?
Yep, already run those in my project.
I tried :checkhealth
and it returned this:
health#coc#check
========================================================================
- OK: Environment check passed
- WARNING: pyx command not work, some extensions may fail to work, checkout ":help |pythonx|"
- OK: Javascript bundle build/index.js found
- OK: Service started
so am looking into the pythonx route
setting "tailwindCSS.trace.server": "verbose"
and checkout tailwindcss-language-server output channel.
I had a similar encounter and got something like this when I reload coc-tailwindcss with CocList extensions
:
[coc.nvim] error: UnhandledRejection: Connection got disposed.
When I ran npm install
, and reloaded, it didn't work. But after setting this "tailwindCSS.trace.server": "verbose"
and coming back to a html file, it worked. 😄 . It hasn't failed even after removing that from coc config.
@iamcco set thte verbose setting and viewing language server output channel as described here
The server log seems to be blank?? (bottom window in screenshot) Let me know if I'm looking in the wrong place, I've not used Coc loads. Thanks!
The LSP is not active, it seems can not found your tailwindcss config
folder structure is below. the html file is ./public/index.html and tailwind.config.js is in the root folder
tree -L 2
.
|-- README.md
|-- css
| `-- tailwind.css
|-- node_modules
| `-- ....
|-- package.json
|-- postcss.config.js
|-- public
| |-- build
| `-- index.html
|-- tailwind.config.js
`-- yarn.lock
274 directories, 8 files
@iamcco any ideas on what to try next?
I've installed coc-tailwindcss and coc-html with otherwise clean nvim config and am still getting the same issue with coc-tailwindcss (coc-html seems to work fine)
I have no idea since there is nothing log you can offer.
Will upgrade to the new LSP when have time https://github.com/iamcco/coc-tailwindcss/issues/33
I encounter the same problem.
After I enter git init
at the project root, the problem is resolved
I guess the tailwind.config.js should be placed in the directory that same with the workspace folder.
Before I enter git init
at the project root, I open the index.html then I check the workspace folder. The workspace folder is the same as where I open the index.html.
I guess the LS will not startup when the tailwind.config.js not placed in the workspace folder
I had the same issue... seemed everything was working OK but changing from Node 10.x to Node 14.x fixed it all up. Hope this helps someone else.