From 233246f5bec9300baa36006a7db0a8fb990a84ba Mon Sep 17 00:00:00 2001 From: delphinus Date: Thu, 4 Apr 2024 23:04:53 +0900 Subject: [PATCH] feat: add type annotations for plenary.run --- lua/plenary/init.lua | 1 + lua/plenary/run.lua | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/lua/plenary/init.lua b/lua/plenary/init.lua index cf039de2..7b398d73 100644 --- a/lua/plenary/init.lua +++ b/lua/plenary/init.lua @@ -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 diff --git a/lua/plenary/run.lua b/lua/plenary/run.lua index 0661fc62..c70a0912 100644 --- a/lua/plenary/run.lua +++ b/lua/plenary/run.lua @@ -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)