mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 17:50:04 +08:00
fix(lsp): set server_ready to false on LspDetach
This commit is contained in:
parent
592bf3941a
commit
4d3c680a93
@ -23,6 +23,12 @@ function M.setup(enabled_clients, override_client_cmds) -- {{{
|
|||||||
vim.api.nvim_buf_set_var(args.buf, 'lsp_server_ready', true)
|
vim.api.nvim_buf_set_var(args.buf, 'lsp_server_ready', true)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
vim.api.nvim_create_autocmd('LspDetach', {
|
||||||
|
group = augroup,
|
||||||
|
callback = function(args)
|
||||||
|
vim.api.nvim_buf_set_var(args.buf, 'lsp_server_ready', false)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
-- Use an on_attach function to only map the following keys
|
-- Use an on_attach function to only map the following keys
|
||||||
-- after the language server attaches to the current buffer
|
-- after the language server attaches to the current buffer
|
||||||
|
Loading…
Reference in New Issue
Block a user