Can't get tailwindcss-language-server
to work
#4930
Replies: 2 comments
-
If you're using Vim you can try inspecting what is going on between the language client with If you're using Neovim then you might want to try using the neovim-lsp-api branch I'm working on and |
Beta Was this translation helpful? Give feedback.
-
Thank you for replying. I'm using VIM 9 and not Neovim. Current Filetype: html
Available Linters: ['tailwindcss-language-server', 'alex', 'angular', 'cspell', 'djlint', 'eslint', 'fecs', 'htmlhint', 'proselint', 'stylelint', 'tidy', 'vscodehtml', 'writegood']
Linter Aliases:
'angular' -> ['angular-language-server', 'angularls']
'writegood' -> ['write-good']
Enabled Linters: ['tailwindcss-language-server']
Ignored Linters: []
Suggested Fixers:
'djlint' - Fix HTML templates with `djlint --reformat`.
'fecs' - Apply fecs format to a file.
'html-beautify' - Fix HTML files with html-beautify from js-beautify.
'prettier' - Apply prettier to a file.
'remove_trailing_lines' - Remove all blank lines at the end of a file.
'rustywind' - Sort Tailwind CSS classes
'tidy' - Fix HTML files with tidy.
'trim_whitespace' - Remove all trailing whitespace characters at the end of every line.
Global Variables:
" Press Space to read :help for a setting
let g:ale_cache_executable_check_failures = v:null
let g:ale_change_sign_column_color = v:null
let g:ale_command_wrapper = ''
let g:ale_completion_delay = 100
let g:ale_completion_enabled = 1
let g:ale_completion_max_suggestions = 50
let g:ale_disable_lsp = 'auto'
let g:ale_echo_cursor = 1
let g:ale_echo_msg_error_str = 'Error'
let g:ale_echo_msg_format = '%code: %%s'
let g:ale_echo_msg_info_str = 'Info'
let g:ale_echo_msg_warning_str = 'Warning'
let g:ale_enabled = 1
let g:ale_fix_on_save = 1
let g:ale_fixers = {'go': ['gofmt'], 'typescript': ['prettier', 'eslint'], 'typescriptreact': ['prettier', 'eslint'], 'javascriptreact': ['prettier', 'eslint'], 'javascript': ['prettier', 'eslint'], 'python': ['black']}
let g:ale_history_enabled = 1
let g:ale_info_default_mode = 'preview'
let g:ale_history_log_output = 1
let g:ale_keep_list_window_open = v:null
let g:ale_lint_delay = 200
let g:ale_lint_on_enter = 1
let g:ale_lint_on_filetype_changed = 1
let g:ale_lint_on_insert_leave = 1
let g:ale_lint_on_save = 1
let g:ale_lint_on_text_changed = 'normal'
let g:ale_linter_aliases = {}
let g:ale_linters = {'gohtmltmpl': ['templ'], 'typescript': ['tsserver', 'eslint'], 'typescriptreact': ['tsserver', 'eslint'], 'javascriptreact': ['tsserver', 'eslint'], 'html': ['tailwindcss-language-server'], 'javascript': ['tsserver', 'eslint'], 'python': ['pyright']}
let g:ale_linters_explicit = 0
let g:ale_linters_ignore = {}
let g:ale_list_vertical = v:null
let g:ale_list_window_size = v:null
let g:ale_loclist_msg_format = v:null
let g:ale_max_buffer_history_size = 20
let g:ale_max_signs = v:null
let g:ale_maximum_file_size = v:null
let g:ale_open_list = v:null
let g:ale_pattern_options = v:null
let g:ale_pattern_options_enabled = v:null
let g:ale_root = {}
let g:ale_set_balloons = 0
let g:ale_set_highlights = 1
let g:ale_set_loclist = 1
let g:ale_set_quickfix = 0
let g:ale_set_signs = 1
let g:ale_sign_column_always = v:null
let g:ale_sign_error = v:null
let g:ale_sign_info = v:null
let g:ale_sign_offset = v:null
let g:ale_sign_style_error = v:null
let g:ale_sign_style_warning = v:null
let g:ale_sign_warning = v:null
let g:ale_sign_highlight_linenrs = v:null
let g:ale_type_map = {}
let g:ale_use_neovim_diagnostics_api = 0
let g:ale_use_global_executables = v:null
let g:ale_virtualtext_cursor = 'all'
let g:ale_warn_about_trailing_blank_lines = 1
let g:ale_warn_about_trailing_whitespace = 1
Command History:
(executable check - success) tailwindcss-language-server
(started) ['/bin/bash', '-c', '''tailwindcss-language-server'' --stdio'] this is my and in channel.log file {"method":"initialize","jsonrpc":"2.0","id":1,"params":{"initializationOptions":{},"rootUri":"file:///home/ashik/src/Playground/Go/go-starter-template","capabilities":{"workspace":{"workspaceFolders":false,"configuration":false,"symbol":{"dynamicRegistration":false},"applyEdit":false,"didChangeConfiguration":{"dynamicRegistration":false}},"textDocument":{"documentSymbol":{"dynamicRegistration":false,"hierarchicalDocumentSymbolSupport":false},"references":{"dynamicRegistration":false},"publishDiagnostics":{"relatedInformation":true},"rename":{"dynamicRegistration":false},"completion":{"completionItem":{"snippetSupport":false,"commitCharactersSupport":false,"preselectSupport":false,"deprecatedSupport":false,"documentationFormat":["plaintext","markdown"]},"contextSupport":false,"dynamicRegistration":false},"synchronization":{"didSave":true,"willSaveWaitUntil":false,"willSave":false,"dynamicRegistration":false},"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":[]}},"dynamicRegistration":false},"typeDefinition":{"dynamicRegistration":false},"hover":{"dynamicRegistration":false,"contentFormat":["plaintext","markdown"]},"implementation":{"dynamicRegistration":false,"linkSupport":false},"definition":{"dynamicRegistration":false,"linkSupport":false}}},"rootPath":"/home/ashik/src/Playground/Go/go-starter-template","processId":2310484}}'
5.777316447 : setting timeout timer to 2 sec 0 nsec
5.778907525 : SafeState: Start triggering
5.779063937 : setting timeout timer to 0 sec 300000000 nsec
5.779405700 : setting timeout timer to 2 sec 0 nsec
.....
6.034592635 RECV on 2(out): '{"jsonrpc":"2.0","id":1,"result":{"capabilities":{"textDocumentSync":1,"hoverProvider":true,"colorProvider":true,"codeActionProvider":true,"documentLinkProvider":{},"completionProvider":{"resolveProvider":true,"triggerCharacters":["\"","'","`"," ",".","(","[","]","!","/","-",":"]},"workspace":{"workspaceFolders":{"changeNotifications":true}}}}}'
6.034595624 : looking for messages on channels
6.034600065 on 2: Invoking channel callback <SNR>111_VimOutputCallback
6.034992249 SEND on 2(in): 'Content-Length: 52
{"method":"initialized","jsonrpc":"2.0","params":{}}'
6.035332770 SEND on 2(in): 'Content-Length: 1100
{"method":"textDocument/didOpen","jsonrpc":"2.0","params":{"textDocument":{"uri":"file:///home/ashik/src/Playground/Go/go-starter-template/web/templates/pages/home.html","version":1,"languageId":"html","text":"{{ block \"content\" . }}\n <h2 class=\"text-4xl font-bold dark:text-white mb-5\">Go Starter Template</h2>\n <p class=\"mb-3 text-gray-500 dark:text-gray-400\">Try adding some todo items</p>\n\n <div hx-boost=\"true\" hx-swap=\"innerHTML show:unset\">\n <a href=\"/todos\" class=\"inline-flex items-center px-5 py-2.5 text-sm font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800\">\n <em>Todos</em>\n <svg class=\"w-3.5 h-3.5 ms-2 rtl:rotate-180\" aria-hidden=\"true\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 14 10\">\n <path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M1 5h12m0 0L9 1m4 4L9 9\"/>\n </svg>\n </a>\n </div>\n{{ end }}\n"}}}'
6.035697038 : SafeState: back to waiting, triggering SafeStateAgain
i see all this so clearly the server is running. but i get no autocompletion for tailwindcss classes or any linting if i use the same class twice. this is the expected behavior and i get this with another editor this is what i get with vim. |
Beta Was this translation helpful? Give feedback.
-
First of all, the plugin is absolutely gold. I am able to do everything with it. I just now need to get the
tailwindcss-language-server
working.this is what i have currently. I followed the help guide to add the
templ
lsp too and it works perfectly fine. So there is somethinig wrong with the tailwind one.ALEInfo
shows that the server is successfully executed but i don't see any linting or any completion.Beta Was this translation helpful? Give feedback.
All reactions