Commit Graph

129 Commits

Author SHA1 Message Date
ray-x
7ca5ad805b allow lsp_keymaps to be a function 2022-04-20 21:24:07 +10:00
rayx
32f103258b
Gotest refactor (#102)
* issue #82 allow close terminal in current buffer

* update go test arguments

* auto complete args updates based on @Craig Rodgigues feedbacks

* update test arguments

* Return cursor to previous cursor position (#101)

`GoGet` and `GoMod` opens up a new split and move the cursor there.
If the cursor isn't moved back to the *.go buffer, `utils.restart`
will try to spawn gopls in the terminal split, which results in
gopls failed to restart properly.

* fix double close when end dap session

* add relFileDir in launch.json

* update sample go app

* fix: remove cover file (#107)

* fix: remove cover file

* fix: coverage notify message

* github action setup for go 1.18

* issue #109 config dap marker

* setup pipeline with go install

* add icons setup options in doc issue #35 issue #109

Co-authored-by: Mochammad Hanif R <etrnal70@gmail.com>
Co-authored-by: Nicolas Barbosa <ndevbarbosa@gmail.com>
2022-04-16 22:09:15 +10:00
ray-x
4c66365aa2 Add GoModeTidy and GoModeVendor 2022-02-22 09:46:59 +11:00
Darkclainer
0ca3de9f84
Fix gotests integration (#87)
GoAddTest, GoAddExpTest and GoAddAllTest affected.
Previously they weren't work with templates (go_nvim_test_template
variable) because file paths should be last argument to gotests.
Also removed different handling of stdout/stderr because seems that
gotests doesn't use stderr or produce any exit code except zero (that
probably OK, but not useful for go.nvim).

Also fixed README.md: description of GoAddTest, GoAddExpTest and
GoAddAllTest and setup example (go.nvim doesn't default test_template to
testify)
2022-02-17 06:57:54 +11:00
ray-x
c622c27bf8 doc updates 2022-02-16 21:25:21 +11:00
ray-x
c9359bb14d Allow lsp diagnostic setup passed from outside 2022-02-15 20:30:42 +11:00
ray-x
edbd796ded Add GoStop command to stop the background task started with GoRun 2022-02-02 17:37:07 +11:00
ray-x
2b059afc54 GoGet 2022-02-02 15:49:54 +11:00
ray-x
a853613467 use -1 for random port 2022-01-30 15:57:56 +11:00
ray-x
ee3c36e25d allow config debug port 2022-01-26 22:51:00 +11:00
ray-x
cd395e96fb setup option to disable gopls doc format 2022-01-17 15:29:38 +11:00
ray-x
2869c5b8fc Add support for vscode launch.json. Allow launch debugger from config in .vscode/launch.json 2022-01-15 20:59:03 +11:00
Craig Rodrigues
817eb44890
Put options in same order in README.md, go.lua (#74) 2022-01-12 19:12:29 +11:00
ray-x
d2f5f9c683 Merge master 2022-01-12 16:02:40 +11:00
ray-x
37b9a66dc2 default debug/dlv keymap to true 2022-01-12 15:58:21 +11:00
ray-x
e232ed38e6 doc update for test_runner 2022-01-12 15:57:55 +11:00
ray-x
0493df8b44 go 1.18beta 2022-01-12 15:57:30 +11:00
Craig Rodrigues
60e0659d50
Set dap_debug_keymap to true by default (#73) 2022-01-12 09:35:42 +11:00
Craig Rodrigues
a54f5d452f
Put options in same order in README.md, go.txt, go.lua (#72) 2022-01-12 08:57:21 +11:00
ray-x
6a228e05cb allow doc argument to be nil 2022-01-11 22:33:23 +11:00
ray-x
2a096a93c1 Default GoDoc to lsp hover if no arguments are provided 2022-01-11 22:12:34 +11:00
ray-x
437748a09f update impl, CLI complete 2021-12-22 15:01:15 +11:00
Craig Rodrigues
483b56f4a2
Replace print() with vim.notify() (#64) 2021-12-22 14:34:10 +11:00
Craig Rodrigues
3a35bff71e
Add warning if lsp_cfg is false, but lsp_on_attach is not nil (#63) 2021-12-22 11:13:52 +11:00
Craig Rodrigues
eebe136396
Make lsp_on_attach nil by default (#62)
Clarify lsp_on_attach in the docs.
2021-12-22 10:51:20 +11:00
ray-x
f53e130370 lsp_on_attach default to false 2021-12-21 22:04:45 +11:00
ray-x
db819954d3 Add GoCodeAction, GUI with guihua.lua and vim.ui.select() 2021-12-17 09:59:47 +11:00
ray-x
84c5ce26f3 GoVet command 2021-12-15 20:22:32 +11:00
ray-x
6574dd2e6b add textobject default setup, doc updates 2021-12-11 14:44:15 +11:00
ray-x
8712f31898 golangci-lint quickfix 2021-12-10 11:44:08 +11:00
ray-x
7d39be9431 add gobinaryinstall/update issue #49 2021-12-06 21:32:23 +11:00
ray-x
3329238deb code action with telescope, dap debug restart 2021-11-30 07:19:45 +11:00
ray-x
4611c34548 updates for dapui 2021-11-24 20:05:02 +11:00
ray-x
1b11f52b08 updates for dap.ui 2021-11-24 10:13:40 +11:00
ray-x
ec91d9915f Add command autocomplete 2021-11-13 14:29:42 +11:00
Hank Donnay
51f4d41363
fix syntax error in default GoTest command (#41) 2021-11-13 09:49:01 +11:00
ray-x
165714cfea allow godoc focusable 2021-11-11 13:01:14 +11:00
Aleš Brelih
d9f44a9320
feat: default build tags (#38)
* feat: default build tags

Added option to specify default build tags for test and debugger.

* Update dap.lua

check   if _GO_NVIM_CFG.build_tags ~= "" then

Co-authored-by: Ales Brelih <ales.brelih@3fs.si>
Co-authored-by: rayx <rayx.cn@gmail.com>
2021-10-25 10:05:02 +11:00
ray-x
37a4cfb1ad issue #35 config break sign 2021-10-23 20:26:11 +11:00
ray-x
569e8e4320 Update reftool and fillstruct 2021-09-30 22:23:36 +10:00
ray-x
7feb745e6c remove gofumport from go.nvim #18 2021-09-25 12:44:52 +10:00
ray-x
3fc75ca46a refact fillstruct and codeaction add GoFixPlurals 2021-09-20 19:05:04 +10:00
ray-x
8c3abfb9f2 go doc command with floating preview 2021-09-18 21:14:02 +10:00
ray-x
c984ce7757 update gotest it will output to buffer 2021-09-03 12:13:15 +10:00
ray-x
e17b25eee7 #26 add goimports -local support 2021-09-01 11:22:05 +10:00
ray-x
200dcd22e4 Allow test nearest function 2021-08-31 21:19:14 +10:00
ray-x
b96cdefea3 Add go coverage 2021-08-26 01:42:31 +10:00
ray-x
c28fa04029 merge github action/workflow 2021-08-24 14:53:37 +10:00
ray-x
989be3f213 update lspconfig setup; add sample vimrc, add codelens config 2021-08-23 12:24:48 +10:00
ray-x
ef1f2bb7cc Feature: Show code lens and add support for run code len action 2021-08-21 20:52:23 +10:00
ray-x
7694511159 Merge and update for gopls & gopls import code action 2021-08-17 09:59:21 +10:00
Ryder
ab0b8c5b2c
fix: deprecated dap.stop (#22) 2021-08-14 19:18:08 +10:00
Ryder
49c0a4280e
fix: max_line_line typo (#21) 2021-08-14 10:27:55 +10:00
ray-x
018de85e7f add gopls cmd path 2021-07-26 10:35:58 +10:00
ray-x
e7a7e95c85 Bugfix issue #15 GoRun 2021-07-17 00:37:41 +10:00
ray-x
af37cb81b8 update Goiferr and doc 2021-07-15 19:18:04 +10:00
ray-x
b566782f4a Update Impl 2021-07-15 01:35:38 +10:00
ray-x
b499269a9d Fix: unmap key, command 2021-07-15 00:15:15 +10:00
ray-x
a65af41408 [Breaking] Rename commands(GoFillStruct GoFillSwitch, Goiferr) 2021-07-14 23:58:31 +10:00
ray-x
034ea57ffe Add alternative command to swtich between go and test file 2021-07-14 08:39:27 +10:00
ray-x
87fcb47470 update lsp setup and document 2021-07-12 14:25:07 +10:00
ray-x
786a9c67ad rename lsp format to gopls format 2021-07-11 21:52:39 +10:00
ray-x
d8fc9cbe1e rename lsp_enable to lsp_cfg 2021-07-11 21:50:09 +10:00
ray-x
a1dc56973d Add options allows goimport and gofmt with lsp. Add options for go.nvim gopls config be loaded 2021-07-11 21:33:22 +10:00
ray-x
b6c0f79ec1 update command name to avoid conflict 2021-07-10 21:10:46 +10:00
ray-x
9d170d4954 Dap support 2021-07-10 21:04:24 +10:00
ray-x
1bdf18bfc2 Add log to file. Fix gotest_fun 2021-07-09 02:16:22 +10:00
David Brouwer
9485e37cc3
Increase reliability (#4)
* Add check to see if commands already exist

* Migrate to go install, as go get will be depricated

* Fix bug in comparison function

* Add installation instructions for $PATH

* remove old stuff

* remove backtick

* complete install

* remove unused function
2021-07-04 12:01:28 +10:00
ray-x
6ac8755142 merge remote changes 2021-06-22 10:11:26 +10:00
ray-x
f9e75eda64 Update GoAddTests and allow vim command override 2021-06-22 10:07:46 +10:00
Viktor Kojouharov
95fe379935
Fix the Gfswitch command to call the right function 2021-05-16 20:21:12 +03:00
ray-x
0a86f87cff add iferr and fillstruct 2021-04-23 16:31:00 +10:00
ray-x
7b285a3600 Add gorename 2021-04-21 21:11:44 +10:00
ray-x
3b11dbb98c adjust gofmt goline setup 2021-04-14 14:45:48 +10:00
ray-x
f6561e7807 update treesitter syntax 2021-03-12 13:54:08 +11:00
ray-x
7d0d1196d7 GoTest 2021-03-11 09:21:24 +11:00
ray-x
cede232c6b GoBuild quickfix 2021-03-11 08:35:30 +11:00
ray-x
f4b359a2c7 fix nil 2021-03-11 07:07:31 +11:00
ray-x
1e190d6a0e init commit 2021-03-10 23:15:06 +11:00