Skip to content
Discussion options

You must be logged in to vote

I went and dug more in the code and used some inspiration using extmarks to write the following - this displays the spinner with some text in the input window of the picker.

---@param cmd table<string> The command and its arguments.
---@param picker snacks.Picker the picker involved
---@param name string? Name of the action to display on the picker.
---@return vim.SystemObj? The handle for the started system process, or nil if the process couldn't start immediately.
M.run_async_with_extmark = function(cmd, picker, name)
	-- get the name of the picker action being run or infer it from the cmd
	local text = name or table.concat(cmd, "-") or ""
	local stimer = vim.uv.new_timer()
	local extma…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by yairh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant