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.
This commit is contained in:
parent
39a941c385
commit
c775437012
1 changed files with 1 additions and 1 deletions
2
init.lua
2
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> | LspStop | LspStart | PackerCompile',
|
||||
group = packer_group,
|
||||
pattern = vim.fn.expand '$MYVIMRC',
|
||||
})
|
||||
|
|
Loading…
Add table
Reference in a new issue