diff --git a/README.md b/README.md index b05a326..20d8318 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Garbage collector that stops inactive LSP clients to free RAM ## Why -In many scenarios, unmanaged LSP clients running on background can take several Gb of RAM. So I wrote this LSP garbage collector for [NormalNvim](https://github.com/NormalNvim/NormalNvim) to auto free it. It has no dependencies, so you can use it on any distro. +In many scenarios, unmanaged LSP clients running on background can take several Gb of RAM. So I wrote this LSP garbage collector for [NormalNvim](https://github.com/NormalNvim/NormalNvim) to auto free it. But you can use it on any distro. ## How to setup Add this to lazy @@ -18,6 +18,7 @@ Add this to lazy ```lua { "zeioth/garbage-day.nvim", + dependencies = "neovim/nvim-lspconfig", event = "VeryLazy", opts = { -- your options here @@ -32,15 +33,15 @@ We also support changing opts on execution time like `:let g:garbage_day_config[ | Name | Default | Description | |--|--|--| -| `grace_period` | `60*15` | Seconds to wait before stopping all LSP clients after neovim loses focus. | +| `aggressive_mode` | `false` | Set it to `true` to stop all lsp clients except the current buffer. `aggressive_mode` operates independently of `grace_period` | | `excluded_lsp_clients` | `{"null-ls", "jdtls"}` | LSP clients that should never be stopped. Useful for LSP clients that miss behave. | -| `stop_invisible` | `false` | Set it to `true` to enable agressive mode. It stops all LSP clients except the ones attached to the visible buffers every time you change to a different buffer, ignoring the grace period. This ensures the minimum RAM consumption. If your CPU is not very powerful, it might take a few seconds to bring back LSP, so keep this option disabled in that case. | +| `grace_period` | `60*15` | Seconds to wait before stopping all LSP clients after neovim loses focus. | | `notifications` | `false` | Set it to `true` to get a notification every time LSP clients are stopped. | +| `retries` | `4` | How many seconds should we keep trying to resume a client before giving up. | ## FAQ * `If it doesn't work`: This plugin has been tested with neovim 0.9 and 0.10. If you are in a neovim version superior to nvim 0.10, and it doesn't work, please [open a issue tagging me](https://github.com/Zeioth/garbage-day.nvim/issues) and I will fix it. -* `If still doesn't work`: Set `stop_invisible` to `false` and try again. If that fixed your issue, please report how to reproduce. ## 🌟 Support the project If you want to help me, please star this repository to increase the visibility of the project.