Commit graph

123 commits

Author SHA1 Message Date
547b2f45f0
revert: automatically restart lsp server
semi revert of 7c198a1b36
2025-11-24 21:42:04 +02:00
f599e75963
chore: mention repo mirrors on other forges 2025-11-20 17:35:37 +02:00
906e340b4f
chore: update config docs 2025-11-06 17:20:08 +02:00
fabdcc5fb3
fix: type annotation 2025-11-06 17:19:53 +02:00
03de1f5ffc
chore: fix formatting 2025-11-06 17:19:53 +02:00
7a18d9f7bd
feat(strct-tags): add support for tag options (#126)
* feat(struct_tags): add options support

* refactor(struct-tags): give input field better name

* feat(struct-tag): add default option

* refactor: make it work on neovim version below 0.12

* chore(struct-tags): update the demo

* refactor: unite struct_tags util with main logic
2025-11-06 14:58:21 +02:00
0de1892ca9
chore(vhs): improve iferr demo 2025-10-26 13:55:44 +02:00
399845fee2
tests: remove plenary from dependencies, since we dont use it 2025-09-28 15:19:22 +03:00
ef4a3a1c7a
fix: type annotation for logger 2025-09-28 15:19:22 +03:00
e8d53840d4
refactor(health): mark all bin deps as required, check if vim version is 0.10 or higher 2025-09-16 15:14:17 +03:00
f4809cd2ec
chore(readme): address the most common issue
there's been several issues related to not installed deps: #124, #111,
#108, and more
2025-09-16 15:14:17 +03:00
0b2c26ebbb
refactor(config): allow both and 'string', and 'nil' for optional params 2025-09-13 12:53:03 +03:00
d1eaebab6b
refactor: fix config type annotations 2025-09-12 20:25:09 +03:00
7c198a1b36
feat: automatically restart lsp server (opt-in) 2025-09-10 16:17:15 +03:00
440a7cc432
chore: add vim 0.11.4 to the suite 2025-09-04 22:54:58 +03:00
1e7af1b212
feat(comment): add support for: interface methods, struct fields, variables (#123)
* refactor(comment): dont use unnecessary function

* chore: quick way to open vim in dev mode

* feat(comment): add comment on on interface method

* feat(comment): add comment on a struct field

* feat(comment): add comment on a variable

* docs: add note about the generate function

* docs: gopher.TsResult

* fix(utils): handle case when indentation is wrong
2025-09-04 16:52:18 +03:00
295e21e637
chore: start demos in vim (#122) 2025-08-31 14:30:13 +03:00
Oleksandr Smirnov
7e8c6f41aa
Merge pull request #121 from olexsmir/develop
sync develop with main
2025-08-30 17:01:47 +03:00
b7ce5d1f35
chore: update readme 2025-08-30 16:59:50 +03:00
Oleksandr Smirnov
9bf72afc63 chore: add demos (#118)
* chore: add dataset for demos

* chore(demos): add demos

* chore: update CONTRIBUTING

* this copefully will fix comments gif
2025-08-30 16:59:50 +03:00
c0951c4769
chore: update CONTRIBUTING.md 2025-08-30 16:59:50 +03:00
d6b41494f1
fix(testutils): validate provided cursor position 2025-08-30 16:59:50 +03:00
Oleksandr Smirnov
b6d3815f9b feat(struct_tags): add range support (#117)
* feat(struct_tags): add range support

* refactor: use `start`, and `end_` naming for ranges
2025-08-30 16:58:32 +03:00
8c87952964
chore(ci): install go bins via gopher.nvim itself 2025-08-30 16:58:32 +03:00
92b0ebb6a7
fix(config): type annotations 2025-08-30 16:58:32 +03:00
e90f766ea3
refactor(test): make helper test function more ergonomic
In my opinion, requiring user to access tests via `T["module_name"]`
was too fragile and typos prone.
2025-08-27 22:00:52 +03:00
53ab4274c2
chore: update tasks, run tests on all recent versions 2025-08-27 21:20:36 +03:00
09696900a5
test: add test for config 2025-08-27 20:56:07 +03:00
6f9648805e
chore: remove unused rules from nvim selene setup 2025-08-27 20:51:30 +03:00
Smirnov Oleksandr
de585144eb
fix(config): use new vim.validate, and not old one (#114) 2025-06-12 17:16:26 +03:00
Smirnov Oleksandr
9db5931af1
fix(impl): not error if no args provided (#110)
* fix(impl): handle case with no arguments provided

* fix(config): validate missing field
2025-04-03 16:52:38 +03:00
Smirnov Oleksandr
9d28cdebf1
fix: add separate timeout for instalelr (#109)
* fix(installer): add separate timeout for installer
2025-03-30 17:20:08 +03:00
Smirnov Oleksandr
ea28fc4e6f
chore: remove nvim-treesitter from dependencies (#107)
* refactor(health): remove treesitter from required plugins

* chore: remove nvim-treesitter from dependencies

* chore(health): update messages
2025-03-27 23:18:27 +02:00
Smirnov Oleksandr
847c79ab76
Merge pull request #106 from olexsmir/develop 2025-03-23 23:08:09 +02:00
7725689d1d
feat: add pkg.json 2025-03-23 22:42:56 +02:00
Smirnov Oleksandr
77754fe362
fix: nightly(0.11) (#104)
* chore: fix minimal_init, load default plugins correctly

* refactor(ts): make it work on nightly

* chore: get nightly back in ci

* fix(tests): some how i now i need to run vim.treesitter.start() to make it work

* feat(ts): check if parser is found

* chore: use --clean instead --noplugin

* refactor(tests): use auto commands instead of putting it in each test

* chore: show the diff of the doc
2025-03-23 19:06:13 +02:00
Smirnov Oleksandr
c0b2834652
docs: update (#103)
* chore: add @dochide annotation

- it's easier to distinguish @private and something i dont want to see in docs

* docs: update

* refactor: move thing out to utils

* fix: lua-ls error

* fixup! refactor: move thing out to utils

* docs: update
2025-03-23 15:46:54 +02:00
592fe82760
chore(ci): update checkout in tests 2025-03-22 21:19:59 +02:00
Smirnov Oleksandr
3dcf708d34
refactor: some refactoring of tests (#102)
* feat(tests): add utils that does most of tests boilerplate

* refactor(tests): rewrite using new thing

* refactor(tests): clean up everywhere

* refactor(tests): remove boilerplate even further

* refactor(tests): soon it will be too far

* refactor(tests): some test renaming
2025-03-22 21:19:59 +02:00
Smirnov Oleksandr
7ebe190c96
refactor/comamnds dont require .setup (#101)
* refactor(commands)!: change the way of disabling commands

BREAKING CHANGE: not it does not require calling .setup()

* docs: update docs
2025-03-22 21:19:59 +02:00
Smirnov Oleksandr
ab68a58b34
Create LICENSE 2025-03-22 21:19:59 +02:00
Smirnov Oleksandr
acd4e6fc30
fix!: fix "Command X not found after loading gopher.nvim" (#100)
BREAKING CHANGE: now calling .setup is required
2025-03-22 21:19:59 +02:00
Smirnov Oleksandr
969db908f8
fix(struct_tags): edge case with structs declared as var (#99)
* fix(struct_tags): edge case with structs declared as var

* test: test it and fix it

* fixup! test: test it and fix it

* fixup! fix(struct_tags): edge case with structs declared as var

* fixup! test: test it and fix it
2025-03-22 21:19:59 +02:00
Smirnov Oleksandr
a993ece59f
feat(config): vim.validate all config after setup (#98) 2025-03-22 21:19:59 +02:00
6ee261cfa6
docs: update readme 2025-03-22 21:19:59 +02:00
Smirnov Oleksandr
7af08c9780
test: unit (#97)
* refactor(utils): remove unused function

* fix(installer): actually pass what should be passed

* docs: add explanation comment

* test: add utils

* refactor(utils): flatten the dir of files

* remove .luarc
2025-03-21 22:12:26 +02:00
Smirnov Oleksandr
9aa0038125
refactor: minimize amount of vimscript (#96)
* refactor: remove autoload

* since nvim 0.9 health.lua files are threaded as checkhealth provider

*  prof of concept 

* fix(runner.gocmd)!: i forgot to update it when i was working on #85

* fix(plugin): now commands register properly

* fix(plugin): fix command name for :GoIfErr

* fix(plugin): respect `setup_commands` option

* docs: update

* refactor(plugin): use vim.schedule

* docs: update CONTRIBUTING
2025-03-21 21:44:42 +02:00
Smirnov Oleksandr
c5cc5080fa
refactor(installer): install gotests@develop by default (#95)
* refactor(installer): automatically install gotests@develop

* docs: update
2025-03-21 00:54:04 +02:00
Smirnov Oleksandr
55bc5787d1
refactor: struct tags (#94)
* refactor(struct_tags): finally my hands got to this

* feat(struct_tags): trim output

* feat(struct_tags): add :GoTagClear

* docgen

* refactor(struct_tags): error on out-of-bounds

* feat(struct_tags): add support for working with multiple tags at the once

* test(struct_tags): test both possible inputs

* refactor(struct_tags): add type annotation, dont force write

* refactor(struct_tags): optimization ig

* docs: fix

* fixup! refactor(struct_tags): add type annotation, dont force write

* task docgen

---------

Co-authored-by: Oliver <1571880470@qq.com>
2025-03-19 18:06:33 +02:00
Smirnov Oleksandr
e9f2eef5e7
refactor: treesitter utils (#91)
* refactor(ts_utils): i dont know why event it was here

* fix: typos

* fix(struct_tags)!: remove statement that i used for debug

* refactor(ts_util): start from scratch

* refactor(struct_tags): use new ts_util

* fixup! refactor(struct_tags): use new ts_util

* test(struct_tags): add support for multiple structs

* fix(gotests): use new api

* fix(impl): refactor some logic, use new api

* docs(ts): add an explanation

* refactor(_utils.ts): all public methods are just adapters

* fix(comment): now it works

* fixup! refactor(_utils.ts): all public methods are just adapters

* fixup! fixup! refactor(_utils.ts): all public methods are just adapters

* test(comment): e2e

* tests(comment): fix

* refactor(utils.ts): fix, docs

* test(comment): fix tests again

* fix(tests/comments): well, now i fell stupid

* refactor(ts): add assert just to be sure that all elements are in the result

* fix(ts): type annotations

* fix(ts): pass bufnr to vim.treesitter.get_node

* chore(ci): disable nightly

* chore(ci): reorganize
2025-03-19 15:09:57 +02:00