1

Refresh generated neovim config

This commit is contained in:
2024-07-14 21:12:36 +02:00
parent f215ce2ab5
commit 00464e0e65
731 changed files with 6780 additions and 31110 deletions

View File

@ -92,19 +92,6 @@ function Input:mount()
})
end
if #self._.default_value then
self:on(event.InsertEnter, function()
vim.api.nvim_feedkeys(self._.default_value, "n", true)
end, { once = true })
end
vim.fn.prompt_setprompt(self.bufnr, self._.prompt:content())
if self._.prompt:length() > 0 then
vim.schedule(function()
self._.prompt:highlight(self.bufnr, self.ns_id, 1, 0)
end)
end
---@deprecated
props.on_submit = function(value)
self._.pending_submit_value = value
@ -122,6 +109,20 @@ function Input:mount()
vim.fn.prompt_setinterrupt(self.bufnr, props.on_close)
vim.fn.prompt_setprompt(self.bufnr, self._.prompt:content())
self:on(event.InsertEnter, function()
if #self._.default_value then
vim.api.nvim_feedkeys(self._.default_value, "n", true)
end
if self._.prompt:length() > 0 then
vim.schedule(function()
self._.prompt:highlight(self.bufnr, self.ns_id, 1, 0)
end)
end
end, { once = true })
vim.api.nvim_command("startinsert!")
end