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
Describe the bug
When I open any buffer that is a Matlab file, the LSP server starts and has ~2GB of memory on each tmux window. Since I use many windows for different repos simultaneously in one tmux session, my RAM tends to overflow if I am not careful.
Also the language server process does not end when I just close the terminal containing the tmux session. If I close the windows individually, the corresponding processes also stop.
To Reproduce
Steps to reproduce the behavior:
Start tmux
Open nvim and edit a matlab file
Open a new window Ctrl-b + c, go to that window, repeat 1.+2.
Open btop or top and filter for matlab process.
Expected behavior
I would expect the LSP to be more lightweight and not use up so much RAM?! According to the screenshot, an entire MATLAB instance is started to run the language server?!
Screenshots
Useful Information
OS Version: Ubuntu 20.04 with nvim v0.10.1
Language Server Client: matlab_ls in combination with mason, mason-lspconfig and nvim-lspconfig
My suspicion is that, as with VS Code, Nvim does not share an instance of the language server between separate Nvim windows. Because of this, each window is instantiating a new instance of the language server, which is then starting its own MATLAB process.
We are aware of this higher-than-expected memory cost for running the language server, and are investigating options for reducing this in the future.
As we continue to look into this, it would be helpful to understand more about your workflow so we can ensure it is captured in our future solution. Can you give some more context about why you are using multiple Nvim windows instead of just one? Is this a Nvim limitation (only one repository per window), or is it more efficient for you?
I suspected as much. Yes, indeed, I am working with multiple (MATLAB) repos and each repo has its own tmux window but mainly for organization purposes, i.e., to keep the buffer list local to that particular repo, e.g., when I use :bufdo %s/old/new/g I don't mess up other repos.
Describe the bug
When I open any buffer that is a Matlab file, the LSP server starts and has ~2GB of memory on each tmux window. Since I use many windows for different repos simultaneously in one tmux session, my RAM tends to overflow if I am not careful.
Also the language server process does not end when I just close the terminal containing the tmux session. If I close the windows individually, the corresponding processes also stop.
To Reproduce
Steps to reproduce the behavior:
Ctrl-b + c
, go to that window, repeat 1.+2.btop
ortop
and filter formatlab
process.Expected behavior
I would expect the LSP to be more lightweight and not use up so much RAM?! According to the screenshot, an entire MATLAB instance is started to run the language server?!
Screenshots
Useful Information
nvim
v0.10.1matlab_ls
in combination with mason, mason-lspconfig and nvim-lspconfigAdditional context
The text was updated successfully, but these errors were encountered: