LuaLS / LuaLS/lua-language-server
Possiblity to share woring context between lua-langserver instances
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 4.4k
- Forks
- 442
- PR merge metrics
- No merged PRs in 30d
Description
Hi there!
I have an usecase that can looks strange for some people, but still it is important for me.
It leads me to the situation, that sometimes I have multiple instances of editor (neovim), running at the same time, and redacting different files in same project(s).
That leads to the situation, that each such instance runs lua_ls, then each lua_ls loads workspace (and eats few gigabytes RAM. Each.).
And, actually all that lua_ls instance in fact doing the same work at the same time.
// by the way, sometimes som instances goes crazy and leaking memory, so sometimes I found that it ate more than 30G RAM, and even swap gone loaded up to about 20G, but I can't properly catch such situations to properly report a bug.
It would be nice if it would be possible to ask those lua_ls instances to somehow share their context, and don't redo the same work each by itself (and also to significantly reduce memory consumption).
P.S. Unfortunatelly, looks like it is impossible to solve that from the editor side (I don't think it is possible at all, to set up nvim (and even other editors) in the way to don't start own lsp servers instances inside each nvim instance, and I even not sure if it is possible to ask it to connect to servers (that supports it) over TCP.
And I'm not sure lua_ls supports tcp transport at all 🤷
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with how lua_ls instances load a workspace and how Neovim starts them; the issue does not name a file or test. Investigate whether instances can share context or communicate over TCP, and consider the work complete only when multiple editor instances avoid duplicating workspace state and memory use.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua, neovim
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100