Skip to content

Commit

Permalink
feat: add type annotations for plenary.run
Browse files Browse the repository at this point in the history
  • Loading branch information
delphinus committed Apr 4, 2024
1 parent f37156b commit 233246f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions lua/plenary/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
---@field operators PlenaryOperators
---@field path PlenaryPath
---@field reload PlenaryReload
---@field run PlenaryRun
---@field scandir PlenaryScandir
---@field strings PlenaryStrings
---@field tbl PlenaryTbl
Expand Down
6 changes: 6 additions & 0 deletions lua/plenary/run.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
local floatwin = require "plenary.window.float"

---@class PlenaryRun
local run = {}

---@param title_text string[]
---@param cmd string|string[]
---@param opts? any
---@return integer bufnr
---@return integer win_id
run.with_displayed_output = function(title_text, cmd, opts)
local views = floatwin.centered_with_top_win(title_text)

Expand Down

0 comments on commit 233246f

Please sign in to comment.