Skip to content

Conversation

@fuegoio
Copy link
Contributor

@fuegoio fuegoio commented Sep 6, 2025

Trying to fix #4015.

As stated in my last comment here, my root_dir manoeuver was only made to improve support for all projects, not only monorepos. I thought every project using TS / Eslint would have a lock file as you need Eslint to be installed somewhere, but there are global installations as well (different from the LSP installation be careful here!).

In this case, I propose that we fallback to the current directory instead, as it means that the TS / Eslint / Biome / ... version is the same and we can reuse the same instance for all files that we open through this nvim process.

I also leveraged nvim priority list to add the .git for project roots, I removed it in my original PR because it was making false positives with lock files.

@fuegoio fuegoio force-pushed the fuego/fix-non-locked-lsp-ts-projects branch from 75e6f1b to 5ce5a9e Compare September 6, 2025 18:39
@fuegoio fuegoio force-pushed the fuego/fix-non-locked-lsp-ts-projects branch from 9fbf7ed to 40a3702 Compare September 10, 2025 10:41
@fuegoio fuegoio requested a review from justinmk September 10, 2025 16:51
@justinmk justinmk changed the title fix: fix typescript / javascript LSPs looking for lock file in global setup fix: ts/js LSPs require lockfile Sep 11, 2025
@justinmk justinmk merged commit ec54d14 into neovim:master Sep 11, 2025
6 checks passed
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.

js/ts language servers (eslint/biome/svelte/ts_ls/vtsls/tsgo) attach to files that are only in workspace directory (ex. directory contains lock file)

2 participants