Initial commit
This commit is contained in:
commit
7fc01485e7
7 changed files with 92 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
playground/
|
||||||
5
lua/gopher/init.lua
Normal file
5
lua/gopher/init.lua
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
local gopher = {}
|
||||||
|
|
||||||
|
gopher.install_deps = require("gopher.installer").install_all
|
||||||
|
|
||||||
|
return gopher
|
||||||
32
lua/gopher/installer.lua
Normal file
32
lua/gopher/installer.lua
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
local Job = require "plenary.job"
|
||||||
|
local M = {
|
||||||
|
urls = {},
|
||||||
|
}
|
||||||
|
|
||||||
|
local function install(pkg)
|
||||||
|
local url = M.urls[pkg] .. "@latest"
|
||||||
|
|
||||||
|
Job
|
||||||
|
:new({
|
||||||
|
command = "go",
|
||||||
|
args = { "install", url },
|
||||||
|
on_exit = function(_, ret_val)
|
||||||
|
if ret_val ~= nil then
|
||||||
|
print("command exited with code " .. ret_val)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
print("install " .. url .. " finished")
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
:sync()
|
||||||
|
end
|
||||||
|
|
||||||
|
---Install required go deps
|
||||||
|
function M.install_all()
|
||||||
|
for pkg, _ in pairs(M.urls) do
|
||||||
|
install(pkg)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
42
nvim.toml
Normal file
42
nvim.toml
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
[vim]
|
||||||
|
any = true
|
||||||
|
|
||||||
|
[describe]
|
||||||
|
any = true
|
||||||
|
[[describe.args]]
|
||||||
|
type = "string"
|
||||||
|
[[describe.args]]
|
||||||
|
type = "function"
|
||||||
|
|
||||||
|
[it]
|
||||||
|
any = true
|
||||||
|
[[it.args]]
|
||||||
|
type = "string"
|
||||||
|
[[it.args]]
|
||||||
|
type = "function"
|
||||||
|
|
||||||
|
[before_each]
|
||||||
|
any = true
|
||||||
|
[[before_each.args]]
|
||||||
|
type = "function"
|
||||||
|
[[after_each.args]]
|
||||||
|
type = "function"
|
||||||
|
|
||||||
|
[assert]
|
||||||
|
any = true
|
||||||
|
|
||||||
|
[assert.is_not]
|
||||||
|
any = true
|
||||||
|
|
||||||
|
[[assert.equals.args]]
|
||||||
|
type = "any"
|
||||||
|
[[assert.equals.args]]
|
||||||
|
type = "any"
|
||||||
|
[[assert.equals.args]]
|
||||||
|
type = "any"
|
||||||
|
required = false
|
||||||
|
|
||||||
|
[[assert.same.args]]
|
||||||
|
type = "any"
|
||||||
|
[[assert.same.args]]
|
||||||
|
type = "any"
|
||||||
1
selene.toml
Normal file
1
selene.toml
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
std="nvim+lua51"
|
||||||
5
spec/gopher_spec.lua
Normal file
5
spec/gopher_spec.lua
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
describe("gopher", function()
|
||||||
|
it("can be required", function()
|
||||||
|
require "gopher"
|
||||||
|
end)
|
||||||
|
end)
|
||||||
6
stylua.toml
Normal file
6
stylua.toml
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
column_width = 100
|
||||||
|
line_endings = "Unix"
|
||||||
|
indent_type = "Spaces"
|
||||||
|
indent_width = 2
|
||||||
|
quote_style = "AutoPreferDouble"
|
||||||
|
no_call_parentheses = true
|
||||||
Loading…
Add table
Add a link
Reference in a new issue