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'm using this with lua-language-server in neovim (Lazyvim).
I have this configuration:
return {
"luals/lua-language-server",
config=function()
require("lspconfig").lua_ls.setup({
on_init=function(client)
localpath=client.workspace_folders[1].nameifvim.loop.fs_stat(path.."/.luarc.json") orvim.loop.fs_stat(path.."/.luarc.jsonc") thenreturnendclient.config.settings.Lua=vim.tbl_deep_extend("force", client.config.settings.Lua, {
runtime= {
-- Tell the language server which version of Lua you're using-- (most likely LuaJIT in the case of Neovim)version="LuaJIT",
},
-- Make the server aware of Neovim runtime filesworkspace= {
checkThirdParty=false,
library= {
vim.env.VIMRUNTIME,
path,
},
},
})
end,
settings= {
Lua= {},
},
})
end,
}
I started a project called TGE.
If I have the project into "/Users/sebastianrodriguezcapurro/Documents/SARCTIANN/LUA/TGE"
But the client.workspace_folders[1].name comes just to "/Users/sebastianrodriguezcapurro/Documents/SARCTIANN" (where I have a lot of other projects in other languages, etc.) So when lsp starts to analyze that folder reach a limit and dies.
If I move TGE to a closer to ~ folder like "/Users/sebastianrodriguezcapurro/Documents/TGE"
everything works as expected.
Why do you think this is an issue with mason-lspconfig.nvim?
I'm not sure, I'm new in nvim and lua. But I assume the client table is coming from lspconfig.
if is not the case I will replicate this issue in lua-language-server repo
Neovim version (>= 0.7)
NVIM 0.9 LUAJIT 2.1
Operating system/version
macOS 14.4.1
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
lua-language-server
Steps to reproduce
Try to work on a lua project inside a large nested path
Actual behavior
lua_ls tries to scan a huge folder that is not the workspace folder and dies in the try.
[WARN][2024-04-10 12:50:48] ...lsp/handlers.lua:537 "More than 100000 files have been scanned. The current scanned directory is `/Users/sebastianrodriguezcapurro/Documents/SARCTIANN`. Please see the [FAQ](https://luals.github.io/wiki/faq/#how-can-i-improve-startup-speeds) to see how you can include fewer files. It is also possible that your [configuration is incorrect](https://luals.github.io/wiki/faq#why-is-the-server-scanning-the-wrong-folder)."
Healthcheck
==============================================================================
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-04-10-phony-organ` is installed.
mason.nvim [Core utils] ~
- OK unzip: `UnZip 6.00 of 20 April 2009, by Info-ZIP. Maintained by C. Spieler. Send`
- WARNING wget: not available
- ADVICE:
- spawn: wget failed with exit code - and signal -. wget is not executable
- OK curl: `curl 8.4.0 (x86_64-apple-darwin23.0) libcurl/8.4.0 (SecureTransport) LibreSSL/3.3.6 zlib/1.2.12 nghttp2/1.58.0`
- OK gzip: `Apple gzip 430.100.5`
- 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-darwin23)`
- OK sh: `Ok`
mason.nvim [Languages] ~
- WARNING Go: not available
- ADVICE:
- spawn: go failed with exit code - and signal -. go is not executable
- 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
- WARNING cargo: not available
- ADVICE:
- spawn: cargo failed with exit code - and signal -. cargo is not executable
- OK Ruby: `ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.arm64e-darwin23]`
- OK node: `v20.10.0`
- OK luarocks: `/opt/homebrew/bin/luarocks 3.11.0`
- WARNING julia: not available
- ADVICE:
- spawn: julia failed with exit code - and signal -. julia is not executable
- OK RubyGem: `3.0.3.1`
- OK python: `Python 3.12.2`
- OK JAVA_HOME: `openjdk version "17.0.9" 2023-10-17 LTS`
- OK java: `openjdk version "17.0.9" 2023-10-17 LTS`
- OK npm: `10.2.3`
- OK javac: `javac 17.0.9`
- OK pip: `pip 24.0 from /opt/homebrew/lib/python3.12/site-packages/pip (python 3.12)`
- OK python venv: `Ok`
mason.nvim [GitHub] ~
- OK GitHub API rate limit. Used: 1. Remaining: 59. Limit: 60. Reset: Wed Apr 10 13:28:52 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:
Problem description
I'm using this with lua-language-server in neovim (Lazyvim).
I have this configuration:
I started a project called TGE.
If I have the project into "/Users/sebastianrodriguezcapurro/Documents/SARCTIANN/LUA/TGE"
But the
client.workspace_folders[1].name
comes just to "/Users/sebastianrodriguezcapurro/Documents/SARCTIANN" (where I have a lot of other projects in other languages, etc.) So when lsp starts to analyze that folder reach a limit and dies.If I move TGE to a closer to
~
folder like "/Users/sebastianrodriguezcapurro/Documents/TGE"everything works as expected.
Why do you think this is an issue with mason-lspconfig.nvim?
I'm not sure, I'm new in nvim and lua. But I assume the
client
table is coming from lspconfig.if is not the case I will replicate this issue in
lua-language-server
repoNeovim version (>= 0.7)
NVIM 0.9 LUAJIT 2.1
Operating system/version
macOS 14.4.1
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
lua-language-server
Steps to reproduce
Try to work on a lua project inside a large nested path
Actual behavior
lua_ls tries to scan a huge folder that is not the workspace folder and dies in the try.
Expected behavior
get the lua_ls working
LspInfo
LspLog
Healthcheck
Screenshots or recordings
No response
The text was updated successfully, but these errors were encountered: