all repos

gopher.nvim @ 28e1f56

Minimalistic plugin for Go development
2 files changed, 14 insertions(+), 10 deletions(-)
refactor(api)!: mave tags and gotests api into their sub tables
Author: Smirnov Oleksandr ss2316544@gmail.com
Committed at: 2024-02-25 01:18:09 +0200
Parent: ebb10e9
M lua/gopher/init.lua

@@ -9,12 +9,16 @@ gopher.impl = require("gopher.impl").impl

gopher.iferr = require("gopher.iferr").iferr gopher.comment = require "gopher.comment" -gopher.tags_add = tags.add -gopher.tags_rm = tags.remove +gopher.tags = { + add = tags.add, + rm = tags.remove, +} -gopher.test_add = tests.func_test -gopher.test_exported = tests.all_exported_tests -gopher.tests_all = tests.all_tests +gopher.test = { + add = tests.func_test, + exported = tests.all_exported_tests, + all = tests.all_tests, +} gopher.get = function(...) gocmd("get", { ... })
M plugin/gopher.vim

@@ -1,8 +1,8 @@

-command! -nargs=* GoTagAdd :lua require"gopher".tags_add(<f-args>) -command! -nargs=* GoTagRm :lua require"gopher".tags_rm(<f-args>) -command! GoTestAdd :lua require"gopher".test_add() -command! GoTestsAll :lua require"gopher".tests_all() -command! GoTestsExp :lua require"gopher".test_exported() +command! -nargs=* GoTagAdd :lua require"gopher".tags.add(<f-args>) +command! -nargs=* GoTagRm :lua require"gopher".tags.rm(<f-args>) +command! GoTestAdd :lua require"gopher".test.add() +command! GoTestsAll :lua require"gopher".test.all() +command! GoTestsExp :lua require"gopher".test.exported() command! -nargs=* GoMod :lua require"gopher".mod(<f-args>) command! -nargs=* GoGet :lua require"gopher".get(<f-args>) command! -nargs=* GoWork :lua require"gopher".work(<f-args>)