cleong14 / lsp-timeout.nvim

Start/stop LSP servers upon demand; keeps RAM usage low

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

🔌 lsp-timeout.nvim

PayPal License

Nvim plugin for nvim-lspconfig: stop idle servers & restart upon focus; keep your RAM usage low

Overview

Some LSP servers are terribly inefficient at memory management and can easily take up gigabytes of RAM MBs if left unattended (just like VS Code huh?!). This plugin prevents excessive memory usage by stopping and restarting LSP servers automatically keeping neovim fast.

⚡Features

  • Stop & start LSP servers upon demand
  • Lower RAM usage by unsed Neovim system window

🔒Requirements

📦 Installation

-- $HOME/.config/nvim/lua/user/init.lua
packer.setup(function(use)
    use({
         "hinell/lsp-timeout.nvim",
        requires={ "neovim/nvim-lspconfig" },
        setup = function()
            vim.g["lsp-timeout-config"] = {
                -- ...
            }
        end
    })
end)
require("lazy").setup(
    {
	"hinell/lsp-timeout.nvim",
	dependencies={ "neovim/nvim-lspconfig" }
    }
)
Plug "hinell/lsp-timeout.nvim"

⚙️ Configuration

See DOCUMENTATION

Troubleshooting

There might some limitations however with LSP servers which don't keep cache on hdd. Some plugins that require active LSP servers like those used for signs may fail. Please, fill the issue for the respective plugin so they check against vim.lsp.get_clients(...).

SUPPORT DISCLAIMER

NO GUARANTEES UNTIL PAID. This project is supported and provided AS IS. See also LICENSE.


September 26, 2023
Copyright © - Alexander Davronov (a.k.a Hinell), et.al.

About

Start/stop LSP servers upon demand; keeps RAM usage low

License:Other


Languages

Language:Lua 87.0%Language:Makefile 13.0%