go.nvim icon indicating copy to clipboard operation
go.nvim copied to clipboard

Adding range to tags

Open kkrime opened this issue 1 year ago • 4 comments

Adding range to the :Go.*Tag commands

@ray-x I'm not sure I understand the :GoModifyTag command, it's not in the documentation, do we really need it?

kkrime avatar Nov 19 '24 07:11 kkrime

@ray-x I'll fix the tests, but before I do so, can you let me know what you think about the changes I've made?

kkrime avatar Nov 21 '24 04:11 kkrime

Thanks for the PR Could you check the action errors lua/go/tags.lua:114: attempt to index local 'opts' (a nil value) ?

ray-x avatar Dec 01 '24 10:12 ray-x

I'm having trouble running the git hub actions locally using act

@ray-x are you able to run the github actions locally and if so what type of machien are you using?? (I'm using osx on m1)

kkrime avatar Dec 07 '24 08:12 kkrime

Sorry for the late reply. To run tests locally, you can use makefile: https://github.com/ray-x/go.nvim/blob/5308b3eb07640d5aff28461048179552b7b7d015/Makefile#L11C1-L12C102

In your case, the go_tags_spec failed you can update the Makefile and adding

localtesttags: localtestsetup
	nvim --headless --noplugin -u lua/tests/init.vim -c "PlenaryBustedFile lua/tests/go_tags_spec.lua"

and then run make localtesttags

The reason test failed is the test is calling tags.add() directly without arguments while in the changes you made, the opt is a must parameter.

ray-x avatar Jan 27 '25 03:01 ray-x