summaryrefslogtreecommitdiff
path: root/lua/lvim/lsp/templates.lua
diff options
context:
space:
mode:
authorkylo252 <[email protected]>2022-01-10 09:54:47 +0100
committerGitHub <[email protected]>2022-01-10 09:54:47 +0100
commitec1e4140fa4156df50785da5d6297145762a7daa (patch)
tree15b160e793f0ee884ca3f93d7c8250c307cec025 /lua/lvim/lsp/templates.lua
parent66e8facb15cd1d93f1ff3c8374eaf9c59d7bc155 (diff)
fix(install): avoid data-races for `on_packer_complete` (#2157)
Diffstat (limited to 'lua/lvim/lsp/templates.lua')
-rw-r--r--lua/lvim/lsp/templates.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/lua/lvim/lsp/templates.lua b/lua/lvim/lsp/templates.lua
index eb05615e..6608047d 100644
--- a/lua/lvim/lsp/templates.lua
+++ b/lua/lvim/lsp/templates.lua
@@ -42,6 +42,10 @@ end
---The files are generated to a runtimepath: "$LUNARVIM_RUNTIME_DIR/site/after/ftplugin/template.lua"
---@param servers_names table list of servers to be enabled. Will add all by default
function M.generate_templates(servers_names)
+ for _, client in pairs(vim.lsp.get_active_clients()) do
+ client:stop()
+ end
+
servers_names = servers_names or {}
Log:debug "Templates installation in progress"