Skip to content

High CPU usage with virtual files in neovim #1394

@igorlfs

Description

@igorlfs

What version of VS Code are you using?

N/A

What version of Tailwind CSS IntelliSense are you using?

v0.14.20

What version of Tailwind CSS are you using?

v4.0.6

What package manager are you using?

pnpm

What operating system are you using?

Linux

Tailwind config

Unrelated

VS Code settings

N/A

Reproduction URL

Any project should trigger this issue. I can provide neovim-specific steps if necessary

EDIT: minimal steps: (0) Obviously, configure the tailwind LSP

  1. In a folder that matches tailwind's root_dir (i.e., any folder with tailwind project should suffice), launch nvim
  2. Create and open a new "virtual file" with :edit foo://bar.svelte

Describe your issue

Recently, neovim (0.11) introduced a new way to configure LSPs. Unfortunately, this new method changed the conditions of when a server attaches to files: by default, LSPs are attached even to "virtual files" (i.e., files that do not exist on disk; these usually come from extensions). When this happens, the tailwind LSP gets stuck with 100% CPU usage until killed.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions