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,3 +1,4 @@
|
|||
---@diagnostic disable: param-type-mismatch
|
||||
return {
|
||||
---@param t table
|
||||
---@return boolean
|
||||
|
|
@ -20,23 +21,6 @@ return {
|
|||
return s:sub(1, n)
|
||||
end,
|
||||
|
||||
---@param lib string
|
||||
---@return boolean
|
||||
lualib_is_found = function(lib)
|
||||
local is_found, _ = pcall(require, lib)
|
||||
return is_found
|
||||
end,
|
||||
|
||||
---@param bin string
|
||||
---@return boolean
|
||||
binary_is_found = function(bin)
|
||||
if vim.fn.executable(bin) == 1 then
|
||||
return true
|
||||
end
|
||||
|
||||
return false
|
||||
end,
|
||||
|
||||
---@param msg string
|
||||
---@param lvl string|integer
|
||||
notify = function(msg, lvl)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue