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:
Smirnov Oleksandr 2022-10-07 17:31:54 +03:00 committed by GitHub
parent d65884b182
commit f835464d7f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 144 additions and 155 deletions

View file

@ -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