Skip to content

Improve language server detection for workspace folders #1334

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

thecrypticace
Copy link
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
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.

1 participant