Skip to content

Improve language server detection for workspace folders#1334

Open
thecrypticace wants to merge 5 commits intomainfrom
fix/parallel-workspace-file-search
Open

Improve language server detection for workspace folders#1334
thecrypticace wants to merge 5 commits intomainfrom
fix/parallel-workspace-file-search

Conversation

@thecrypticace
Copy link
Copy Markdown
Contributor

@thecrypticace thecrypticace commented Apr 23, 2025

This PR should enable quicker booting of the language server in large multi-root workspaces

  1. Potentially improved detection time in multi-root workspaces

Now we'll start the server as soon as any search has requested that it be started. Any remaining searches will be cancelled instead of waiting for them to complete. The language server itself will still do a more exhaustive search to find projects in all registered workspace folders.

  1. Ignore pre-processor files that don't contain @config

Tailwind CSS v4 required us to analyze the workspace for more stylesheets that may contain @import (because @import "tailwindcss" and similar), @theme, etc… but these are only supported in .css files and not .styl, .sass, .scss, .less, etc…

We were already doing this because v3 looked for @config but that is valid in any stylesheet type. Now we restrict @import, @theme, etc matching to .css files and we'll be less likely to start the server if we don't need to.

@thecrypticace thecrypticace force-pushed the fix/parallel-workspace-file-search branch from 034c2d2 to 3737a96 Compare May 9, 2025 22:56
@thecrypticace thecrypticace requested a review from RobinMalfait May 9, 2025 22:59
@thecrypticace thecrypticace marked this pull request as ready for review May 9, 2025 23:00
@thecrypticace thecrypticace changed the title wip: Improve language server detection for workspace folders Improve language server detection for workspace folders May 9, 2025
@reslear
Copy link
Copy Markdown

reslear commented May 18, 2025

maybe fix #1371

@thecrypticace thecrypticace added this to the 0.16.0 milestone Sep 30, 2025
@solidprinciples
Copy link
Copy Markdown

@thecrypticace - facing this issue, was just delving into the codebase to understand further.

I found that hoisting the css file to monorepo root in my case (using nuxt/ui, installed from monorepo root) fixed it.

Seems like nuxt/ui was not resolving unless placed in the appropriate folder for project detection. Bootstraping a new nuxt app, non-mono repo, was able to resolve the additional nuxt-ui styles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants