Some refactoring (#20)
* feat: move all lua api into `api` module * feat: remove boilerplate code, add go work suport * refactor(utils): separete module for health * refactor(dap): remove copy-paste code * fix: comment * chore(lsp): disable type checking * feat: add `go work` command
This commit is contained in:
parent
d65884b182
commit
f835464d7f
13 changed files with 144 additions and 155 deletions
|
|
@ -1,19 +1,19 @@
|
|||
---@diagnostic disable: param-type-mismatch
|
||||
local function get_arguments()
|
||||
local function get()
|
||||
vim.ui.input({ prompt = "Args: " }, function(input)
|
||||
return vim.split(input or "", " ") ---@diagnostic disable-line: missing-parameter
|
||||
end)
|
||||
end
|
||||
|
||||
local co = coroutine.running()
|
||||
if co then
|
||||
return coroutine.create(function()
|
||||
local args = {}
|
||||
vim.ui.input({ prompt = "Args: " }, function(input)
|
||||
args = vim.split(input or "", " ")
|
||||
end)
|
||||
local args = get()
|
||||
coroutine.resume(co, args)
|
||||
end)
|
||||
else
|
||||
local args = {}
|
||||
vim.ui.input({ prompt = "Args: " }, function(input)
|
||||
args = vim.split(input or "", " ")
|
||||
end)
|
||||
return args
|
||||
return get()
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue