LuaLS / LuaLS/lua-language-server

Possiblity to share woring context between lua-langserver instances

オープン
#2,101 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

question
主要言語
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 🤷

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、lua_ls インスタンスがワークスペースをどのように読み込み、Neovim がそれらをどのように起動するかを調べます。この issue ではファイルもテストも指定されていません。インスタンス間でコンテキストを共有したり、TCP 経由で通信したりできるかを調査し、複数のエディターインスタンスがワークスペースの状態とメモリ使用量を重複して保持しないことを確認できた場合にのみ、作業完了とみなします。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
lua, neovim
領域
devtools
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。