diff --git a/lua/rocks_treesitter/highlight.lua b/lua/rocks_treesitter/highlight.lua index ca5372b..df43659 100644 --- a/lua/rocks_treesitter/highlight.lua +++ b/lua/rocks_treesitter/highlight.lua @@ -76,9 +76,8 @@ local function prompt_auto_install(rocks) -- TODO: Enable check when we have tagged releases -- if #rocks == 1 then local rock = rocks[1] - local yesno = vim.fn.input("Install " .. rock.name .. "? y/n: ") - print("\n ") - install_rock_or_mark_declined(string.match(yesno, "^y.*") and rock.version) + local choice = vim.fn.confirm("Install " .. rock.name .. "?", "y/n", "n", "Question") + install_rock_or_mark_declined(choice == 1 and rock.version or nil) -- elseif #rocks > 1 then -- local choices = vim.iter(rocks) -- :map(function(rock)