-
-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: wrap plenary async, rename types
- Loading branch information
Showing
32 changed files
with
437 additions
and
197 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,25 @@ | ||
NeotestConfig neotest.txt /*NeotestConfig* | ||
NeotestDiagnosticsConfig neotest.txt /*NeotestDiagnosticsConfig* | ||
NeotestFloatingConfig neotest.txt /*NeotestFloatingConfig* | ||
NeotestHighlightsConfig neotest.txt /*NeotestHighlightsConfig* | ||
NeotestIconsConfig neotest.txt /*NeotestIconsConfig* | ||
NeotestIntegratedStrategyConfig neotest.txt /*NeotestIntegratedStrategyConfig* | ||
NeotestOutputConfig neotest.txt /*NeotestOutputConfig* | ||
NeotestStatusConfig neotest.txt /*NeotestStatusConfig* | ||
NeotestStrategiesConfig neotest.txt /*NeotestStrategiesConfig* | ||
NeotestSummaryConfig neotest.txt /*NeotestSummaryConfig* | ||
NeotestSummaryMappings neotest.txt /*NeotestSummaryMappings* | ||
neotest neotest.txt /*neotest* | ||
neotest.Config neotest.txt /*neotest.Config* | ||
neotest.Config.diagnostic neotest.txt /*neotest.Config.diagnostic* | ||
neotest.Config.floating neotest.txt /*neotest.Config.floating* | ||
neotest.Config.highlights neotest.txt /*neotest.Config.highlights* | ||
neotest.Config.icons neotest.txt /*neotest.Config.icons* | ||
neotest.Config.output neotest.txt /*neotest.Config.output* | ||
neotest.Config.status neotest.txt /*neotest.Config.status* | ||
neotest.Config.strategies neotest.txt /*neotest.Config.strategies* | ||
neotest.Config.strategies.integrated neotest.txt /*neotest.Config.strategies.integrated* | ||
neotest.Config.summary neotest.txt /*neotest.Config.summary* | ||
neotest.Config.summary.mappings neotest.txt /*neotest.Config.summary.mappings* | ||
neotest.attach() neotest.txt /*neotest.attach()* | ||
neotest.config neotest.txt /*neotest.config* | ||
neotest.diagnostic neotest.txt /*neotest.diagnostic* | ||
neotest.output neotest.txt /*neotest.output* | ||
neotest.output.open() neotest.txt /*neotest.output.open()* | ||
neotest.run() neotest.txt /*neotest.run()* | ||
neotest.setup() neotest.txt /*neotest.setup()* | ||
neotest.status neotest.txt /*neotest.status* | ||
neotest.stop() neotest.txt /*neotest.stop()* | ||
neotest.summary.close() neotest.txt /*neotest.summary.close()* | ||
neotest.summary.open() neotest.txt /*neotest.summary.open()* | ||
neotest.summary.toggle() neotest.txt /*neotest.summary.toggle()* | ||
neotest.summmary neotest.txt /*neotest.summmary* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
local plen_async = require("plenary.async") | ||
|
||
local function proxy_vim(prop) | ||
return setmetatable({}, { | ||
__index = function(_, k) | ||
return function(...) | ||
-- if we are in a fast event await the scheduler | ||
if vim.in_fast_event() then | ||
plen_async.util.scheduler() | ||
end | ||
|
||
return vim[prop][k](...) | ||
end | ||
end, | ||
}) | ||
end | ||
|
||
local async_wrapper = { | ||
api = proxy_vim("api"), | ||
fn = proxy_vim("fn"), | ||
} | ||
|
||
setmetatable(async_wrapper, { | ||
__index = function(_, k) | ||
return plen_async[k] | ||
end, | ||
}) | ||
|
||
return async_wrapper |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.