-
-
Notifications
You must be signed in to change notification settings - Fork 29
feat: support tailwindcss "v3" and use of server package #70
base: master
Are you sure you want to change the base?
feat: support tailwindcss "v3" and use of server package #70
Conversation
This can be selected and displayed with workspace.showOutput, but as with upstream, we have added a dedicated command.
Old setting items have been deleted. - tailwindCSS.htmlLanguages - tailwindCSS.jsLanguages - tailwindCSS.cssLanguages Also, various Vim-specific filetype (e.g. htmldjango) have been added to the default settings in `tailwindCSS.includeLanguages`.
@iamcco ping |
This is working perfectly ! |
@yaegassy I also switched to your branch, is working perfect! thanks! |
How can I directly use this branch with coc? |
You need to install the extension with a Plugin Manager, for Add to your Plug 'yaegassy/coc-tailwindcss', {'do': 'npm install && npm run build', 'branch': 'feat/support-v3-and-use-server-pkg'} |
InitializationOptions are no longer required on the Language Server side.
It seems that the latest version (v0.0.7) of the server package ( Committed the upgrade of the server package. I also adjusted and committed the relevant client-side (coc-tailwindcss) code. v0.0.6 and later version, it seems that a fallback process has been added to use the tailwindcss module shipped with the server if the project's tailwindcss module cannot be detected correctly. REF:
|
Added a custom setting called
This setting allows you to use the tailwind's language server module installed in any location. Usage Example 1 (vsix)prepare:
setting: {
"tailwindCSS.custom.serverPath": "/tmp/tailwindcss-language-server/extension/dist/server/tailwindServer.js"
} Usage Example 2 (npm)prepare:
setting: {
"tailwindCSS.custom.serverPath": "/Users/yaegassy/.nvm/versions/node/v16.13.1/bin/tailwindcss-language-server"
} |
@iamcco ping |
Not sure if I did anything wrong, but It appears the coc-tailwind language server isn't turning on for .svelte files, this may be out of the scope of this PR as I have never used the previous coc-tailwind to know if it previously support it, but looking at the source code it seems to be a previous feature I can manually toggle it on for svelte files, but it get's little tedious |
@Yofou Try running
Rename In my environment, it worked with svelte. Capture: |
How to install this before merge? |
Hi @adinvadim, Here is an example of
|
This works awesome!! nice job |
@AnishDe12020 I don't use packer, so I don't know the cause.
You may also want to check if it works without using the plugin manager. e.g.: .vimrc/init.vim
EDIT: Ah, The log says Uninstall
|
Thanks a lot, reinstalling worked! |
fixed an error that occurred when setting a non-existent file path.
This is great. Got everything working nicely. Also enabled Twin.Macro intellisense by edting the
|
@yaegassy You are amazing. Just wanted to say that your PR works beautifully as well! |
Please, please, please merge this :) Lifesaver! |
I just published
As a supplement, Headwind-related feature have been removed. Note that: after iamcco came back and merge this PR, the you should use back coc-tailwindcss. |
Description
The other day, version 3 of tailwindcss was officially released. https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.0.0
The current coc-tailwindcss does not seem to be able to use v3 properly and comfortably. :(
I created a PR for v3 referenced on upstream code. 🙇 https://github.com/tailwindlabs/tailwindcss-intellisense/tree/master/packages/vscode-tailwindcss
As a side note, I have confirmed that tailwindcss v2 can also be used.
Summary
@tailwindcss/language-server
@tailwindcss/language-server
initializationOptions
are no longer required inv0.0.7
.tailwindCSS.showOutput
commandworkspace.showOutput
, but as with "upstream", we have added a dedicated command.tailwindCSS.cssLanguages
,tailwindCSS.jsLanguages
,tailwindCSS.htmlLanguages
settingstailwindCSS.includeLanguages
has been added.*
toworkspaceContains:**/tailwind.config.js
, etc...tailwindCSS.custom.serverPath
.DEMO (mp4)
Before
01_before-coc-tailwindcss.mp4
After
02_after_coc-tailwind-css.mp4