LuaLS / LuaLS/lua-language-server
Possiblity to share woring context between lua-langserver instances
還沒有人認領這個 Issue。
- 主要語言
- Lua
- 星號
- 4.4k
- 分支
- 442
- PR 合併指標
- 30 天內沒有已合併 PR
描述
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 🤷
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
先了解 lua_ls 執行個體如何載入工作區,以及 Neovim 如何啟動它們;該 issue 未指定檔案或測試。調查執行個體是否可以共用內容或透過 TCP 通訊,並且只有在多個編輯器執行個體能夠避免重複工作區狀態和記憶體使用量時,才認為工作完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- lua, neovim
- 領域
- devtools
- Issue 類型
- 功能
- 難度
- 5/5
- 預估耗時
- 一週以上
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 25/100