Skip to content

Commit

Permalink
refactor(ui): use vim.fn.choice
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcjkb committed Jun 7, 2024
1 parent 5a43908 commit 53a0913
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lua/rocks_treesitter/highlight.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 53a0913

Please sign in to comment.