File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,15 @@ vim.api.nvim_create_user_command(
7171 }
7272)
7373vim .api .nvim_create_user_command (
74- ' GoToTest' ,
74+ ' GoTestOpen' ,
75+ ' lua require("go.test").test_open(<f-args>)' ,
76+ {
77+ nargs = ' ?' ,
78+ complete = ' command' ,
79+ }
80+ )
81+ vim .api .nvim_create_user_command (
82+ ' GoToTest' , -- alias of GoTestOpen
7583 ' lua require("go.test").test_open(<f-args>)' ,
7684 {
7785 nargs = ' ?' ,
@@ -183,7 +191,7 @@ vim.api.nvim_clear_autocmds({
183191if opt .auto_format then
184192 vim .api .nvim_create_autocmd ({ ' BufWritePre' }, {
185193 group = group ,
186- pattern = ' *.go' ,
194+ pattern = ' *.go' ,
187195 command = ' GoFormat' ,
188196 })
189197end
Original file line number Diff line number Diff line change @@ -165,7 +165,8 @@ Commands~
165165`:GoAddTest` *:GoAddTest*
166166 Generate unit test for current function.
167167
168- `: GoToTest (cmd)` *:GoToTest*
168+ `: GoToTest (cmd)` *:GoTestOpen* *:GoToTest*
169+ `: GoTestOpen (cmd)`
169170 Go from `* .go ` to `* _test.go ` or go back. It will create new file if
170171 `* _test.go ` does not exist. The default command is `edit ` , you may pass
171172 `vsplit ` , `split ` , `tabedit ` or commands like that.
You can’t perform that action at this time.
0 commit comments