Skip to content

Commit 55db008

Browse files
committed
feat: only prompt to install lsp once
1 parent 422a79e commit 55db008

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

lua/elixir/language_server/init.lua

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -275,11 +275,15 @@ function M.setup(opts)
275275
}
276276

277277
if not opts.cmd and not cmd:exists() then
278-
vim.ui.select({ "Yes", "No" }, { prompt = "Install ElixirLS" }, function(choice)
279-
if choice == "Yes" then
280-
install_elixir_ls(vim.tbl_extend("force", repo_options, { install_path = cmd:parent() }))
281-
end
282-
end)
278+
if vim.g.elixirnvim_has_prompted_for_install ~= true then
279+
vim.ui.select({ "Yes", "No" }, { prompt = "Install ElixirLS" }, function(choice)
280+
if choice == "Yes" then
281+
install_elixir_ls(vim.tbl_extend("force", repo_options, { install_path = cmd:parent() }))
282+
end
283+
284+
vim.g.elixirnvim_has_prompted_for_install = true
285+
end)
286+
end
283287

284288
return
285289
end

0 commit comments

Comments
 (0)