You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I seem to have noticed the following error when opening an astro file in a subpackage of my pnpm monorepo.
Error executing vim.schedule lua callback: ...HEAD-4833a63_1/share/nvim/runtime/lua/vim/lsp/client.lua:584: RPC[Error] code_name = InternalError, message = "Request initialize failed with message: Can't find typescript.js or tsserverlibrary.js in \"/Users/hacksore/code/overlayed/apps/web/node_modules/typescript/lib\""
stack traceback:
[C]: in function 'assert'
...HEAD-4833a63_1/share/nvim/runtime/lua/vim/lsp/client.lua:584: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>
This is true because in my monorepo I pin typescript to the project root so apps/web/node_modules/typescript does not exists.
As a crude workaround I've installed typescript into the nested package and the errors goes away but perhaps there is a better fix for this.
Why do you think this is an issue with mason-lspconfig.nvim?
Ideally the LSP params should be smart enough to support monorepos by traversing to the root if the CWD doesnt contain one perhaps?
Otherwise fallback to a vendor dir.
Neovim version (>= 0.7)
main ✔ $ nvim --version
NVIM v0.11.0-dev-1001+g4833a6392-Homebrew
Build type: Release
LuaJIT 2.1.1727870382
Run "nvim -V1 -v" for more info
Operating system/version
macOS Sequioa
I've manually reviewed the Nvim LPS client log (:LspLog) to find potential errors
Yes
I've recently downloaded the latest plugin version of mason.nvim, mason-lspconfig.nvim, and nvim-lspconfig
Yes
Affected language servers
astro-ls
Steps to reproduce
create a monorepo
make apps/astro-app via npx create-astro
open any astro file in the sub directory
Actual behavior
error above
Expected behavior
LSP to find the typescript monorepo root version of typescript or fallback to vendored folder.
==============================================================================
mason: require("mason.health").check()
mason.nvim ~
- OK mason.nvim version v1.10.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-10-19-aback-cherry` 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.24.5 built on darwin23.2.0.`
- OK curl: `curl 8.7.1 (x86_64-apple-darwin24.0) libcurl/8.7.1 (SecureTransport) LibreSSL/3.3.6 zlib/1.2.12 nghttp2/1.62.0`
- OK gzip: `Apple gzip 448.0.3`
- OK tar: `bsdtar 3.5.3 - libarchive 3.5.3 zlib/1.2.12 liblzma/5.4.3 bz2lib/1.0.8 `
- OK bash: `GNU bash, version 3.2.57(1)-release (arm64-apple-darwin24)`
- OK sh: `Ok`
mason.nvim [Languages] ~
- OK cargo: `cargo 1.81.0 (2dbb1af80 2024-08-20)`
- 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
- OK Ruby: `ruby 3.3.5 (2024-09-03 revision ef084cc8f4) [arm64-darwin23]`
- OK node: `v20.12.2`
- OK luarocks: `/opt/homebrew/bin/luarocks 3.11.1`
- OK Go: `go version go1.23.2 darwin/arm64`
- WARNING julia: not available
- ADVICE:
- spawn: julia failed with exit code - and signal -. julia is not executable
- OK npm: `10.5.0`
- OK python: `Python 3.13.0`
- OK RubyGem: `3.5.18`
- OK pip: `pip 24.2 from /opt/homebrew/lib/python3.13/site-packages/pip (python 3.13)`
- OK python venv: `Ok`
- OK JAVA_HOME: `openjdk version "17.0.13" 2024-10-15`
- OK java: `openjdk version "17.0.13" 2024-10-15`
- OK javac: `javac 17.0.13`
mason.nvim [GitHub] ~
- OK GitHub API rate limit. Used: 1. Remaining: 59. Limit: 60. Reset: Sat Oct 19 13:23:59 2024.
Install and authenticate via gh-cli to increase rate limit.
Screenshots or recordings
No response
The text was updated successfully, but these errors were encountered:
Hacksore
changed the title
astro LSP failes to load typescript from monorepo subdirectory
astro LSP fails to load typescript from monorepo subdirectory
Oct 19, 2024
Problem description
Hi folks 👋
Related: #74
I seem to have noticed the following error when opening an astro file in a subpackage of my pnpm monorepo.
This is true because in my monorepo I pin typescript to the project root so
apps/web/node_modules/typescript
does not exists.As a crude workaround I've installed typescript into the nested package and the errors goes away but perhaps there is a better fix for this.
Why do you think this is an issue with mason-lspconfig.nvim?
Ideally the LSP params should be smart enough to support monorepos by traversing to the root if the CWD doesnt contain one perhaps?
Otherwise fallback to a vendor dir.
Neovim version (>= 0.7)
main ✔ $ nvim --version
NVIM v0.11.0-dev-1001+g4833a6392-Homebrew
Build type: Release
LuaJIT 2.1.1727870382
Run "nvim -V1 -v" for more info
Operating system/version
macOS Sequioa
I've manually reviewed the Nvim LPS client log (
:LspLog
) to find potential errorsI've recently downloaded the latest plugin version of mason.nvim, mason-lspconfig.nvim, and nvim-lspconfig
Affected language servers
astro-ls
Steps to reproduce
apps/astro-app
vianpx create-astro
Actual behavior
error above
Expected behavior
LSP to find the typescript monorepo root version of typescript or fallback to vendored folder.
LspInfo
LspLog
No response
Healthcheck
Screenshots or recordings
No response
The text was updated successfully, but these errors were encountered: