Skip to content

Possiblity to share woring context between lua-langserver instances #2101

@msva

Description

@msva

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 🤷

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionUser has a question

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions