Skip to content

Commit

Permalink
feat: remove autocmd BufReadPost on LspStop
Browse files Browse the repository at this point in the history
so that lsp won't be auto started on buf read after explicit stop with LspStop.
  • Loading branch information
brookhong committed Jan 29, 2024
1 parent 8917d2c commit 8472b1f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lua/lspconfig/configs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ function configs.__newindex(t, config_name, config_def)
api.nvim_create_autocmd('BufReadPost', {
pattern = fn.fnameescape(root_dir) .. '/*',
callback = function(arg)
if #M.manager:clients() == 0 then
return true
end
M.manager:try_add_wrapper(arg.buf, root_dir)
end,
group = lsp_group,
Expand Down

0 comments on commit 8472b1f

Please sign in to comment.