diff options
| author | amalgame21 <93383215+amalgame21@users.noreply.github.com> | 2022-12-28 06:33:44 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-28 01:33:44 -0500 |
| commit | b6fd5b0bb09e815ed3ad1e128e7e22331c774959 (patch) | |
| tree | 2e792d81ede23e3eb800f133fa6db130c66305de /nvim | |
| parent | 5e45cfce6aec14d96b1ddb48cc22066d5b790db9 (diff) | |
| download | dots-b6fd5b0bb09e815ed3ad1e128e7e22331c774959.tar.gz | |
Prevent multiple language servers from being spawned after every file save of init.lua (#96)
* Prevent multiple language servers from being spawned
Prevent multiple language servers from being spawned after every save of init.lua, which eventually leads to high RAM usage and system freeze.
* Supress error messages
add `silent!` in case of error message when nvim-lspconfig is not installed
Diffstat (limited to 'nvim')
| -rw-r--r-- | nvim/init.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nvim/init.lua b/nvim/init.lua index 636d86a..c8f18d5 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -87,7 +87,7 @@ end -- Automatically source and re-compile packer whenever you save this init.lua local packer_group = vim.api.nvim_create_augroup('Packer', { clear = true }) vim.api.nvim_create_autocmd('BufWritePost', { - command = 'source <afile> | PackerCompile', + command = 'source <afile> | silent! LspStop | silent! LspStart | PackerCompile', group = packer_group, pattern = vim.fn.expand '$MYVIMRC', }) |