williamboman / mason-lspconfig.nvim

Extension to mason.nvim that makes it easier to use lspconfig with mason.nvim.
Apache License 2.0
2.64k stars 159 forks source link

Tailwind Language Server Slow #352

Open Redoxahmii opened 7 months ago

Redoxahmii commented 7 months ago

Problem description

Tailwind Language server is very slow compared to the other servers that i am using causing a delay of nearly 1 second before it displays anything. I am using LazyVim and have not really changed anything.

Why do you think this is an issue with mason-lspconfig.nvim?

The issue seems to be with how the lsp server is being handled but i am not completely aware of it so any help is appreciated.

Neovim version (>= 0.7)

NVIM v0.9.5 Build type: Release LuaJIT 2.1.1702233742

Operating system/version

Linux redox-laptop 6.7.1-arch1-1 #1 SMP PREEMPT_DYNAMIC Sun, 21 Jan 2024 22:14:10 +0000 x86_64 GNU/Linux

I've manually reviewed the Nvim LPS client log (:LspLog) to find potential errors

I've recently downloaded the latest plugin version of mason.nvim, mason-lspconfig.nvim, and nvim-lspconfig

Affected language servers

Tailwind Language Server

Steps to reproduce

Just simply use it.

Actual behavior

some issue with how the information is handed back from the server but not sure.

Expected behavior

should be faster.

LspInfo

Language client log: /home/redox/.local/state/nvim/lsp.log
 Detected filetype:   typescriptreact

 4 client(s) attached to this buffer: 

 Client: tsserver (id: 1, bufnr: [269, 3])
    filetypes:       javascript, javascriptreact, javascript.jsx, typescript, typescriptreact, typescript.tsx
    autostart:       true
    root directory:  /home/redox/Code/Native/BloodDonation
    cmd:             /home/redox/.local/share/nvim/mason/bin/typescript-language-server --stdio

 Client: emmet_language_server (id: 2, bufnr: [269, 3])
    filetypes:       css, eruby, html, htmldjango, javascriptreact, less, pug, sass, scss, typescriptreact
    autostart:       true
    root directory:  /home/redox/Code/Native/BloodDonation
    cmd:             /home/redox/.local/share/nvim/mason/bin/emmet-language-server --stdio

 Client: tailwindcss (id: 3, bufnr: [269, 3])
    filetypes:       aspnetcorerazor, astro, astro-markdown, blade, clojure, django-html, htmldjango, edge, eelixir, elixir, ejs, erb, eruby, gohtml, gohtmltmpl, haml, handlebars, hbs, html, html-eex, heex, jade, leaf, liquid, mdx, mustache, njk, nunjucks, php, razor, slim, twig, css, less, postcss, sass, scss, stylus, sugarss, javascript, javascriptreact, reason, rescript, typescript, typescriptreact, vue, svelte
    autostart:       true
    root directory:  /home/redox/Code/Native/BloodDonation
    cmd:             /home/redox/.local/share/nvim/mason/bin/tailwindcss-language-server --stdio

 Client: copilot (id: 4, bufnr: [269, 3])
    filetypes:       
    autostart:       false
    root directory:  /home/redox/Code/Native/BloodDonation
    cmd:             node /home/redox/.local/share/nvim/lazy/copilot.lua/copilot/index.js

 Other clients that match the filetype: typescriptreact

 Config: eslint
    filetypes:         javascript, javascriptreact, javascript.jsx, typescript, typescriptreact, typescript.tsx, vue, svelte, astro
    root directory:    Not found.
    cmd:               /home/redox/.local/share/nvim/mason/bin/vscode-eslint-language-server --stdio
    cmd is executable: true
    autostart:         true
    custom handlers:   eslint/openDoc, eslint/noLibrary, eslint/probeFailed, eslint/confirmESLintExecution

 Configured servers list: lua_ls, pyright, marksman, cssls, emmet_language_server, eslint, tailwindcss, jsonls, ruff_lsp, yamlls, html, tsserver, volar

LspLog

No response

Healthcheck

mason: require("mason.health").check()

mason.nvim ~
- OK mason.nvim version v1.9.0
- OK PATH: prepend
- OK Providers: 
  mason.providers.registry-api
  mason.providers.client
- OK neovim version >= 0.7.0

mason.nvim [Registries] ~
- OK Registry `github.com/mason-org/mason-registry version: 2024-01-26-net-canoe` is installed.

mason.nvim [Core utils] ~
- OK unzip: `UnZip 6.00 of 20 April 2009, by Info-ZIP.  Maintained by C. Spieler.  Send`
- OK wget: `GNU Wget 1.21.4 built on linux-gnu.`
- OK curl: `curl 8.5.0 (x86_64-pc-linux-gnu) libcurl/8.5.0 OpenSSL/3.2.0 zlib/1.3.1 brotli/1.1.0 zstd/1.5.5 libidn2/2.3.4 libpsl/0.21.2 (+libidn2/2.3.4) libssh2/1.11.0 nghttp2/1.59.0`
- OK gzip: `gzip 1.13`
- OK tar: `tar (GNU tar) 1.35`
- OK bash: `GNU bash, version 5.2.26(1)-release (x86_64-pc-linux-gnu)`
- OK sh: `Ok`

mason.nvim [Languages] ~
- WARNING Go: not available
  - ADVICE:
    - spawn: go failed with exit code - and signal -. go is not executable
- WARNING Composer: not available
  - ADVICE:
    - spawn: composer failed with exit code - and signal -. composer is not executable
- WARNING PHP: not available
  - ADVICE:
    - spawn: php failed with exit code - and signal -. php is not executable
- WARNING Ruby: not available
  - ADVICE:
    - spawn: ruby failed with exit code - and signal -. ruby is not executable
- WARNING RubyGem: not available
  - ADVICE:
    - spawn: gem failed with exit code - and signal -. gem is not executable
- OK node: `v20.10.0`
- OK cargo: `cargo 1.75.0`
- WARNING julia: not available
  - ADVICE:
    - spawn: julia failed with exit code - and signal -. julia is not executable
- OK python: `Python 3.11.6`
- OK luarocks: `/usr/bin/luarocks 3.9.2`
- OK java: `openjdk version "17.0.10" 2024-01-16`
- OK javac: `javac 17.0.10`
- OK npm: `10.2.3`
- OK pip: `pip 23.3.2 from /usr/lib/python3.11/site-packages/pip (python 3.11)`
- OK python venv: `Ok`

mason.nvim [GitHub] ~
- OK GitHub API rate limit. Used: 4. Remaining: 56. Limit: 60. Reset: Sat 27 Jan 2024 01:26:03 AM PKT.
  Install and authenticate via gh-cli to increase rate limit.

Screenshots or recordings

No response

matmilbury commented 4 months ago

I can confirm. When editing a simple markdown file, my neovim freezes for a few seconds. Then reacts to input, then freezes again. It's unusable.

Uninstalling the tailwind lsp server alleviated the issue.