Commit Graph

460 Commits

Author SHA1 Message Date
Yajie Zhu
6c793a1c6f
fix: use strict test function name while debugging (#197)
* fix: use strict test function name while debugging

* fix: use strict test function name while debugging

* Revert "fix: use strict test function name while debugging"

This reverts commit f47dd66c50.

Co-authored-by: zhuyajie <930664@qq.com>
2022-08-07 21:00:48 +10:00
ray-x
943cf236d0 goget #194 2022-08-06 22:00:49 +10:00
ray-x
c3dd9e3ee8 smart build tags 2022-08-06 21:11:12 +10:00
ray-x
ca7cb5fe34 lint 2022-08-06 13:45:01 +10:00
ray-x
ce73ef43f0 cleanup ts logs; utils get build tags renaming 2022-08-06 12:54:32 +10:00
ray-x
ddbb30a38e remove log messages 2022-08-06 12:18:53 +10:00
ray-x
c94c488307 automatically add build tags to gopls. handle "// go:build tagxxx" 2022-08-06 10:49:09 +10:00
ray-x
160897a93f test failure 2022-08-05 20:26:40 +10:00
ray-x
d5e5a65c03 moving from vim script to lua scripts (autocmd, highlight) 2022-08-05 19:34:44 +10:00
ray-x
2930eb9f17 spelling, default sign highlight 2022-08-05 10:48:08 +10:00
ray-x
7fea49e79f rename from gocoverage_sign_priority to sign_priority 2022-08-05 10:07:56 +10:00
ray-x
9ea9ee2c4b issue #192 coverage sign priority 2022-08-05 10:02:35 +10:00
ray-x
3f2e7f49bd json to go struct 2022-08-04 23:30:52 +10:00
ray-x
5516cf7fff issue #190 check line range before get_params 2022-08-04 21:30:41 +10:00
ray-x
524b65f85a bugfix: some user commands failed because incorrect setup of lua api 2022-08-04 10:35:38 +10:00
mateusz
e401dd9f31
fix wrongly documented default value (lsp_gofumpt) (#188)
* fix wrongly documented default value

* Revert "fix wrongly documented default value"

This reverts commit 63c537dc50.

* fix default lsp_gofumpt
2022-08-02 01:19:12 +10:00
ray-x
74d65542d4 issue #189 format warning message 2022-08-01 17:02:21 +10:00
ray-x
f4d8a0b691 allow dap to be lazyload 2022-08-01 10:53:37 +10:00
ray-x
b7d6288bbd use neovim 0.7 API to create commands. this is a breaking change for anyone using neovim 0.6.x 2022-08-01 10:09:05 +10:00
ray-x
c1db235792 issue #186 2022-08-01 09:08:52 +10:00
ray-x
4e44e251db update notify message when format is missing 2022-08-01 09:05:04 +10:00
ray-x
bedc73166a #187 vim.lsp.buf.format missing in some version of neovim 2022-08-01 09:04:28 +10:00
ray-x
06c27c1cf5 missing end 2022-08-01 08:36:38 +10:00
mateusz
002e199562
synchronous goimports (#186)
* fix save formatting

* fix vim.lsp.buf.format polyfill

* reformat and default values

* remove extra end

Co-authored-by: rayx <rayx.cn@gmail.com>
2022-08-01 08:30:35 +10:00
ray-x
a9b669772f check if gopls is running before send codelens request 2022-08-01 00:57:32 +10:00
ray-x
5c2c14a5f6 lint 2022-07-31 21:54:30 +10:00
ray-x
b647bd1ae9 issue #183 codelens refresh in on_attach 2022-07-31 21:27:27 +10:00
ray-x
1ca53c0a00 refresh codelens in on_attach 2022-07-31 21:03:45 +10:00
ray-x
8fb06f43a2 cache the client info results for inlay 2022-07-31 11:35:48 +10:00
ray-x
db47b70d21 startup delay because the BufEnter autocommands 2022-07-31 11:29:38 +10:00
ray-x
93c724d6b0 issue #184 trouble 2022-07-30 23:05:27 +10:00
ray-x
7aed764507 allow more trigger events for codelens 2022-07-30 16:00:09 +10:00
ray-x
144eb6fb2a issue #182 setup merge 2022-07-29 22:23:52 +10:00
ray-x
72bff85508 issue #181 merge gopls setup 2022-07-28 20:53:19 +10:00
ray-x
a816cdb5e7 windows extensions 2022-07-28 02:22:38 +10:00
ray-x
7c62c7c27a add windows exe extension #179 2022-07-28 02:22:38 +10:00
Tai Groot
f378f7ffa2
remove leading space on hint args (#180) 2022-07-27 02:59:05 -07:00
ray-x
3bdd56b1c0 issue #179 windows 11 2022-07-27 14:50:39 +10:00
ray-x
3774ac0eba lint 2022-07-27 02:21:58 +10:00
ray-x
5b70d93603 lint 2022-07-27 02:05:24 +10:00
ray-x
e5c7d643b1 gosnips return default, similar to fillreturns by gopls 2022-07-26 12:39:41 +10:00
ray-x
7342608bd6 issue #175 hover 2022-07-22 22:18:53 +10:00
ray-x
c8d02a9d6a inlay hints #172 2022-07-20 09:27:59 +10:00
ray-x
f0732425f9 more snips, e.g. uuid, random words/strings etc 2022-07-17 21:33:29 +10:00
ray-x
deccb2c6c3 GoMockGen cmd fix 2022-07-17 21:33:29 +10:00
liangkai
dffe933fd1
replace utils.notify by utils.warn (#168) 2022-07-14 15:38:54 +10:00
rayx
0e8cc90e30
Bugfix #160 (#167)
* snips

* update ts node spec format

* luasnip up and running

* bugfix alternate file

* Bring in more snippets

* updates for mockery 2.11

* snips for http handler and more

* update doc

* bench test

* for snips

* update treesitter query and api

* refact get_xxx_at_cursor

* update test spec

* update row to vim range

* update col number

* remove comments

* merge conflicts
2022-07-12 23:11:46 +10:00
rayx
104b832ee4
Luasnip (#165)
First commit for luasnip
Most of the snip code is from this repo shark
and TJ's neovim setup config_manager
and ziontee113

* add luasnip for go

* move command out to a dedicated function

* update ts node spec format

* bugfix alternate file

* Bring in more snippets

* updates for mockery 2.11

* snips for http handler and more

* update doc

* bench test
2022-07-11 23:32:06 +10:00
ZHL
bc25de4d85
upgrade ginkgo version to v2 (#166)
It might be a breaking change for those using ginkgo v1
2022-07-11 17:39:21 +10:00
ray-x
c7fa2fe5fc tuning treesitter type def 2022-07-09 22:03:17 +10:00
ray-x
e43eaf43b7 go-dap keymap desc 2022-07-09 19:26:31 +10:00
ray-x
607ed738e5 improve treesitter query 2022-07-09 15:54:43 +10:00
ray-x
d1384cf2c0 revert changes break github actions 2022-07-08 22:02:58 +10:00
Steffen Siering
300fffc87d
Fix: GoCoverage (#164)
Co-authored-by: urso <steffen.siering at gmail>
2022-07-08 21:59:25 +10:00
Benedikt Müller
1b5b77feb8
fix lsp_on_client_start option (#163) 2022-07-08 20:44:19 +10:00
ray-x
a4026941d0 issue #161 allow project setup to be disabled 2022-07-08 20:30:23 +10:00
ray-x
1315ed89ad add tests for asyncmake 2022-07-08 08:30:46 +10:00
ray-x
ab8a075aa4 add efm only mode for testing when floating term is off 2022-07-08 02:34:50 +10:00
ray-x
fcc473b1ec GoImpl autocomplete from treesitter symbols 2022-07-08 01:27:30 +10:00
ray-x
9ad2568465 better key unmap, allow recover the keymap to user defined key 2022-07-07 23:46:36 +10:00
ray-x
29a23a31e3 issue #153 -count=x 2022-07-07 21:23:18 +10:00
ray-x
300836a9cb go impl: allow omit interface and use treesitter to find a interface name and package name 2022-07-07 03:57:26 +10:00
ray-x
31624e1365 treesitter node for struct and type 2022-07-07 03:12:24 +10:00
ray-x
eaec8c45f2 revert changes to golden file 2022-07-06 15:28:15 +10:00
ray-x
8021f2a484 fix test automation 2022-07-06 15:06:16 +10:00
ray-x
c588f2bf4a tests updates 2022-07-06 14:30:13 +10:00
ray-x
6108dc9ea1 bugfix test failure 2022-07-06 13:21:02 +10:00
ray-x
a15427f902 mockgen from source 2022-07-06 09:29:44 +10:00
ray-x
e84d3ab545 improve #155 allow GoImpl fallback if struct type def not found 2022-07-06 08:58:17 +10:00
ray-x
484524b875 do not use golines as goimport default formater, #157 2022-07-06 08:29:59 +10:00
ray-x
a86e9d2a29 Feature: add go mock / mockgen 2022-07-06 08:28:29 +10:00
rayx
2371bf414b
[Breaking] change keymap api (#152)
the keymap api used in version no longer support neovim 0.6.x. Please use nvim-0.6 branch if you do not want to update to neovim 0.7, BTW, if you do not use go.nvim for debugging, it should not affect you.
2022-07-04 12:13:46 +10:00
ray-x
a2d0bbee53 bugfix #153, update doc 2022-07-03 09:11:26 +10:00
Aleš Brelih
edda37cb5e
Cmd is tranformed to string before pushed to term (#151)
* Cmd is tranformed to string before pushed to term

Float terminal command is tranformed to string using table.concat before
used. This allow us to use neovim buff option to unite quoting.

* Update term.lua

Co-authored-by: Ales Brelih <ales.brelih@3fs.si>
Co-authored-by: rayx <rayx.cn@gmail.com>
2022-07-02 12:33:20 +10:00
ray-x
84ac01df53 Feature: show keybindings for debug session 2022-07-01 20:30:43 +10:00
ray-x
981adf9b39 Features:
1) count the overall test coverage per-file and per-project
2) add gotestsum as a test runner option
3) handle windows GOPATH and
4) minor fix: stop GoFmt if no formatter is available
2022-07-01 19:15:31 +10:00
David Brouwer
ee39b539b9
fix(dap): don't close empty stdout stderr handle (#149)
Add nil check to closure of stdout stderr handle
2022-07-01 19:06:02 +10:00
David Brouwer
6e7410452f
Fix empty string and GoRun -F main module (#147)
* fix: append check if val is nil
Add check to see if value is empty. And don't add to path if already in
path.

Signed-off-by: Davincible <david.brouwer.99@gmail.com>

* feat: auto run main module in floating term
Add check to see if floating term, to auto run main file

Signed-off-by: Davincible <david.brouwer.99@gmail.com>

* Update asyncmake.lua

no need to show a notification as there is another one once the program is finished.

Co-authored-by: rayx <rayx.cn@gmail.com>
2022-07-01 08:26:14 +10:00
ray-x
36a33ad5b0 #146 better fallback if test runner is non-default and not installed 2022-07-01 02:44:39 +10:00
ray-x
c9ba685250 should call dapui.setup only once, #145
check dapui is_open
2022-06-30 15:44:54 +10:00
ray-x
eae9af9c1d recommit fix for #145 due to merge failure 2022-06-30 12:41:20 +10:00
ray-x
5873520c34 #143 exact function mane match 2022-06-29 15:01:17 +10:00
ray-x
4bc6b563ce go treesitter locals.scm add go_impl_spec 2022-06-29 00:37:20 +10:00
ray-x
28b553aa52 handle nil output with runner 2022-06-28 15:35:05 +10:00
ray-x
3f8551cc11 issue #141 the result of shell command should be checked before proccess
the output
2022-06-28 14:36:30 +10:00
rayx
5504f55b4f
[Feature]Package info side panel (#140)
New feature.
It shows all public symbols inside a go package with a side panel.

Also refer https://github.com/golang/go/issues/37237 for some workaround

* add side_panel for go package

* Add command GoPkgInfo

* multi lines hint

* allow refresh when buffer write happed

* remove node of receiver

* update treesitter queries for better panel display

* variadic args
2022-06-27 08:12:49 +10:00
ray-x
16c37da2f8 go coverage: toggle the coverage indicator after metric is shown 2022-06-22 13:57:27 +10:00
ray-x
d3d278d58a doc update 2022-06-22 13:53:26 +10:00
ray-x
fb4f37a328 allow show coverage summary with 'go tool cover -func' in qf 2022-06-22 13:33:30 +10:00
ray-x
7045635404 bugfix for fish terminal 2022-06-21 19:04:30 +10:00
ray-x
7945c74580 breaking changes dapui #137 2022-06-21 12:54:26 +10:00
ray-x
be47f4fb6c errorformat/efm 2022-06-18 18:37:42 +10:00
ray-x
410808938e lint 2022-06-18 18:31:37 +10:00
ray-x
755e5816f0 guru support 2022-06-18 15:43:07 +10:00
ray-x
44d6a9d8f3 add list_imports support 2022-06-16 14:10:49 +10:00
ray-x
9d8117766c dap restart fix, fish fix 2022-06-16 11:38:37 +10:00
ray-x
040c7bd110 Update document
Smart build tags detection
2022-06-15 14:11:10 +10:00
ray-x
0bf69f9315 pull #136 use cmd string for floating terminal run 2022-06-07 20:10:49 +10:00
ray-x
b3c6bde824 flags to load coverage file 2022-06-07 20:10:49 +10:00
ray-x
ccaed8c573 cli improvement for gomodifytags, gotest 2022-06-03 19:07:05 +10:00
ray-x
ffd3b019a9 treesitter with dap to capture current function name 2022-06-02 19:07:28 +10:00
ray-x
9036f3bf88 fix plurals change edit orders 2022-06-02 13:25:08 +10:00
ray-x
fb4048df8b package.config 2022-06-02 00:47:00 +10:00
ray-x
a064f1e4f5 DIR_SEP nil 2022-06-02 00:43:34 +10:00
ray-x
76b31e6e74 DIR_SEP 2022-06-02 00:41:29 +10:00
ray-x
099790c988 go lint 2022-06-02 00:38:58 +10:00
ray-x
30d30f407a fix diagnostic warnings for all files 2022-06-01 21:29:13 +10:00
ray-x
2b15b59d18 issue #132 goimport format options 2022-06-01 09:01:41 +10:00
ray-x
f5f5c41165 fix typo 2022-05-31 16:16:09 +10:00
ray-x
56143544d7 revert escape changes, it breaks floaterm run 2022-05-31 02:41:48 +10:00
ray-x
0cc455457c notify level based on test result 2022-05-31 00:32:26 +10:00
ray-x
ad84a0806c update GoTest adding more flags 2022-05-31 00:04:52 +10:00
ray-x
002d7dfd73 infer the test func name with treesitter 2022-05-29 23:07:39 +10:00
ray-x
fc928a40e9 show cheatsheet in floating window 2022-05-28 20:54:45 +10:00
ray-x
9d7845707d gorename setup in lsp, allow guihua gui 2022-05-28 03:20:33 +10:00
qasimwarraich
f9d094c8e5
fix(code_actions): Remove now deprecated telescope_code_actions() (#130)
- Removes `telescope_code_actions()` function.
- Sets associated keybinding to `vim.lsp.buf.code_action`
2022-05-28 02:51:03 +10:00
ray-x
e09a3ebe23 error handle for exit code from go build and allow chtsh get query from current word 2022-05-27 11:39:29 +10:00
ray-x
eb4d380807 allow format all buffers with goimports 2022-05-26 15:07:14 +10:00
ray-x
58dd76bf90 remove trace func 2022-05-25 16:06:36 +10:00
ray-x
051e8b2afa cheatsheet(cht.sh) supports in go.nvim 2022-05-25 14:36:34 +10:00
ray-x
bbb37ea81f split none UI releated logic for testing 2022-05-24 21:43:33 +10:00
ray-x
8d1c468901 github action 2022-05-24 21:17:55 +10:00
ray-x
8103d462c5 github action fix 2022-05-24 21:14:40 +10:00
ray-x
7b5c408b88 github action failure fix 2022-05-24 20:58:54 +10:00
ray-x
fed6b24482 select test from functions 2022-05-24 19:17:26 +10:00
ray-x
125d6fa3d3 better test coverage for gotest 2022-05-24 17:54:52 +10:00
ray-x
323cfae1fa add tests for go test 2022-05-24 17:23:53 +10:00
ray-x
362ff2fd37 more tests fixplurals 2022-05-22 20:11:14 +10:00
ray-x
a06e091d68 GoImpl allow specify receiver name 2022-05-21 15:11:10 +10:00
ray-x
52ccb2e690 GoImpl updates, allow no arguments and let treesitter do everything for you 2022-05-19 14:12:14 +10:00
ray-x
dbf0094f25 write buffer after gofmt 2022-05-17 15:04:26 +10:00
ray-x
e3504bc50f allow gorun in float terminal 2022-05-17 11:34:35 +10:00
ray-x
257218611e merge conflict 2022-05-15 22:34:44 +10:00
ray-x
1f4711e681 Merge branch 'master' into serverCapcities 2022-05-15 22:06:04 +10:00
ray-x
73eed9e67b remove un-used setup in breakpoint save 2022-05-15 22:05:12 +10:00
ray-x
80e94444bb merge master 2022-05-15 21:46:44 +10:00
ray-x
669ad39639 update launch.json and readme.md for the new commands 2022-05-15 21:43:59 +10:00
ray-x
1449635984 launch.json create folder if not existed 2022-05-15 14:38:55 +10:00
ray-x
e3551f08bc add logs 2022-05-15 14:19:05 +10:00
ray-x
f187f10678 Update GoModxxx cmds 2022-05-15 14:09:07 +10:00
ray-x
de1306a986 goenv and load breakpoints 2022-05-14 21:24:55 +10:00
ray-x
f3e1da9968 save and load breaks 2022-05-14 21:24:55 +10:00
ray-x
e54ed67325 remove fixplurals gotool and using treesitter 2022-05-14 21:24:55 +10:00
ray-x
0dd08fddc5 add gonvim project file parser 2022-05-14 21:24:55 +10:00
ray-x
0c8ffc2b86 add go boilerplate 2022-05-14 21:24:55 +10:00
Marco Mayer
eba7daeb16
fix gotests template parameters, better names(?), small formatting fixes, update README (#125) 2022-05-14 20:52:12 +10:00
ray-x
128d2c14f3 Merge branch 'master' into serverCapcities 2022-05-14 01:08:28 +10:00
ray-x
14f298af92 Merge branch 'boilerplate' 2022-05-14 01:08:04 +10:00
ray-x
0faaf7bd0a save and load breaks 2022-05-14 01:07:44 +10:00
ray-x
e77920422e Merge branch 'master' into serverCapcities 2022-05-13 20:58:27 +10:00