Meh I'll figure out submodules later
This commit is contained in:
parent
4ca9d44a90
commit
8cb281f436
352 changed files with 66107 additions and 0 deletions
|
|
@ -0,0 +1,28 @@
|
|||
local floatwin = require "plenary.window.float"
|
||||
|
||||
local run = {}
|
||||
|
||||
run.with_displayed_output = function(title_text, cmd, opts)
|
||||
local views = floatwin.centered_with_top_win(title_text)
|
||||
|
||||
local job_id = vim.fn.termopen(cmd)
|
||||
|
||||
local count = 0
|
||||
while not vim.wait(1000, function()
|
||||
return vim.fn.jobwait({ job_id }, 0)[1] == -1
|
||||
end) do
|
||||
vim.cmd [[normal! G]]
|
||||
count = count + 1
|
||||
|
||||
if count == 10 then
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
vim.fn.win_gotoid(views.win_id)
|
||||
vim.cmd [[startinsert]]
|
||||
|
||||
return views.bufnr, views.win_id
|
||||
end
|
||||
|
||||
return run
|
||||
Loading…
Add table
Add a link
Reference in a new issue