Commit graph

80 commits

Author SHA1 Message Date
6dc99955e9
chore(docs): add docs 2025-12-08 21:26:30 +02:00
72dd68f25f
feat(json2go): implement 2025-12-08 21:11:47 +02:00
7764f6e37f
revert: automatically restart lsp server (#128)
semi revert of 7c198a1b36
2025-11-25 17:02:38 +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
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
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
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
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
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
92b0ebb6a7
fix(config): type annotations 2025-08-30 16:58:32 +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
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
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
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
Smirnov Oleksandr
d1a21bffab
feat(iferr): add -message support (#89)
* feat(iferr): add *-message* support

* generate docs
2025-03-03 14:22:28 +02:00
Smirnov Oleksandr
57b5dbf62e
feat(struct_tags): set default tag (#87)
* feat(struct_tags): add config option for default tag

* docs: docgen

* fix(struct_tags): as it turns out it didnt work as i supposed to before, but now it does
2025-03-02 17:19:00 +02:00
Smirnov Oleksandr
c2f64db4a8
refactor(health): remove deprecations (#86) 2025-03-02 16:43:30 +02:00
Smirnov Oleksandr
6016ca57d4
refactor: use vim.system instead of pleanry (#85)
* refactor!: migrate to vim.system

* refactor(gotests): use vim.system

* refactor(iferr): use vim.system

* refactor(impl): use vim.system

* refactor(installer): use vim.system and add sync mode

* test: fix gotests' tests

* refactor(struct_tags): use vim.system

* chore(ci): install all deps explicitly

* refactor(installer)!: add sync as an option

* docs: update readme
2025-03-02 16:31:50 +02:00
Smirnov Oleksandr
837897a79d
fix: typos (#82)
* docs(gotests): update and fix

* fix(health): typos

* docs(impl): update and fix typos

* docs(config): typos

* docs(iferr): update

* typos

* docs(struct_tags): update

* docs: fix typos

* docs: Capitalization

* docgen
2025-02-25 14:08:15 +02:00
Smirnov Oleksandr
cd8a5efc88
refactor!: remove dap adapter (#81) 2025-02-25 13:16:24 +02:00
Smirnov Oleksandr
da960189c1
tests: improve testing (#80)
* chore: setup mini.test

* chore(ci): setup new test runner, install plugin deps

* chore(ci): test only on stable and nightly releases

* test: iferr

* test: struct_tags

* test: impl

* test: gotests
2025-02-24 14:21:01 +02:00
Smirnov Oleksandr
0ed14a40d9
fix(iferr): improve error handling (#75) 2024-12-23 22:44:13 +02:00
Smirnov Oleksandr
a995af3415
sync develop and main (#68)
* healthcheck: refactoring, remove deprecation wanings (#35)

* refactor(checkhealth): remove deprecation warnings, complete rewrite

* refactor(checkhealth): rename util file

* style(healthchecker): reformat lua in vim file

* refactor(health): move all report function into table

* add editorconfig (#36)

* refactor of public plugin's api (#37)

* refactor: move all plugin functionality to init.lua

* fix(commands): now it uses correct module paths

* refactor(config): change way how it handles options

* refactor(gotests): use correct config, change way how deps required, fix some typos

* fix(healthchecker): use correct config

* refactor(iferr): change api

* refactor(impl): change api

* refactor(installer): change api

* refactor(struct_tags): change way of importting deps

* refactor(struct_tags): rename M to struct_tags

* run stylua

* refactor(dap): make it all in one file, and make some refactoring

* refactor(_utils): change way how it organizes

* fix: use new _utils api

* refactor(_utils.health): reorganize module

* refactor(_utils.ts): some renameing, moving requires lines

* run stylua

* update tooling (#38)

* chore: delete pre-commit

* chore: switch from makefile to taskfile

* chore(ci): update and add one more linter

* chore(editorconfig): add config for Go

* chore(editorconfig): remove max_line_length

* fix: editorconfig-check on README.md

* feat: run tests independent from user's nvim config

* remove editorconfig-checker

* fix(config): now it not removes .setup() from itself after calling
.setup()

* fix(config): now it works correctly

* chore: update taskfile, and linter config

* feat(config): make it optional to call .setup()

* run tests independent of user nvim setup (#39)

* chore(lua_ls): now lua_ls knows about testing functions

* spec: change way how tests srtuctured

* test(config): refactor tests

* test: utils

* refactor(utils): remove not used function

* chore(ci): add test runner

* chore(ci): remove taskfile from deps

* fix: now it works

* fix(dap): now dlv uses cmd to run from config

* chore(ci): run tests on many versions of nvim

* refactor: commands runner (#42)

* feat(utils): first impl of own commands runner

* refactor(gotests): uses own runner instead of vendored

* refactor(utils): back to plenary.job

* refactor(gotests): use new runner, clean code

* fix(runner): now it returns output correctly

* refactor(iferr): use vim.system

i have tried to use _utils.runner, but i can't figure out how to make `< file.go` for the command

* refactor(impl): use new runner

* refactor(installer): use new runner

* refactor(struct_tags): use new runner

* refactor: commands such as :GoGet runs with new runner

* refactor: throw errors in more lua way, i think

* refactor(utils): notify now has title

* refactor: use more correct way of notifying

* refactor(runner): write error message on error

* add ability for setting custom tools options (#44)

* feat(gotests): add custom templates support

* feat(struct_tags): add support for custom `transform` option

* fix(health): check if bin is installed, and added message about treesitter parser

* fix: fix iferr config (#56)

* Add support for named tests (#50)

* fix(typo): README.md (#47)

* feat: add support for named tests

* test

* tags in table

* debug installer msg

* test

* hardcoded @develop

* get gotests tag from setup()

* update readme

* store install tag in urls table

* removed gotests tag

* update README.md

* remove urls installer index reference

* remove named arg from add_test()

* .

* update README.md

* update README.md

---------

Co-authored-by: Steve M <gearcog@users.noreply.github.com>

* reformat .editorconfig config

* refactor(api)!: mave tags and gotests api into their sub tables

* add help file, and docs (#59)

* idk how good this idea is

* this could be working but i still cant figure out how to run it

* ignore tags that mini.doc gens, but why?

* chore(taskfile): force exiting after tests

because i got infinit ci

* chore(ci): add more nvim versions to run on

* chore: update taskfile

* feat: add docs generator

* docs: its only begining

* refactor: update docgen script

* docs: write some more

* docs(config): update

* docs: update readme

* language

* hope it would work

* what about that?

* maybe this would work?

* update md

* upd

* WHY DOESNT IT WORKING

* idk by but 0.9.3 just fails the ci, so i deleted it from suite

* again update, why does markdown not work in embeded html

* maybe it can help?

* upd

* again update

* kinda fix

* fix: formatting

* again some updating

* some readme updating

* fix, this shouldnt be in repo

* i finnaly undertood how to fix this fking skill issue

* fix(struct_tags): typo

* refactor(docs): change the order in generated file

* docs: install deps

* refactor(scripts): rename doc-gen script

* docs(impl): write docs

* docs(dap): add doc

* stylua .

* docs(struct_tags): add doc

* docs(gotests): add docs

* docs(iferr): add docs

* docs(comment): add doc

* update CONTRIBUTING.md

* docs(README): talk about `develop` branch

* docs: update README.md

* refactor(health): keep in mind new way of health check (#63)

* feat: add logger (#64)

* refactor(health): keep in mind new way of health check (#63)

* feat(log): add logger module

* refactor(utils): remove unused code

* refactor(log, utils): get plugin name from config

* refactor(logger): add some type annotations

* refactor(utils): log notifications

* feat: LOGGER™

* feat(config): TYPES

* refactor(log): dont give a thing about var that is not even declared

* feat(log): add easy way to open log

* refactor(log): some types

* update types

* docs: regen

* fix(log): make setting log level by config work

* feat(iferr): write error to log file if occur

* feat(gotests): add logger

* add deprecation message (#67)

---------

Co-authored-by: Arne Van Maele <93863978+arnevm123@users.noreply.github.com>
Co-authored-by: Alex <49870662+ysomad@users.noreply.github.com>
Co-authored-by: Steve M <gearcog@users.noreply.github.com>
2024-06-15 12:43:06 +03:00
Elliott Minns
03cabf675c
Resolve Neovim Deprecations for version 0.10 (#26)
* fix deprecation warnings for treesitter parse_query

* use treesitter.query.parse

* fix get_node_text deprecation
2023-05-07 17:56:26 +03:00
Pavel
cc46546a93
Fix typo (#25) 2023-02-01 14:42:26 +02:00
Smirnov Oleksandr
2f0edbfdfc
refactor: move requires in place where they used (#22)
* refactor(comment): move require to a function

* refactor(gotests): move requires inside of functions

* refactor(health): move requires inside of function

* refactor(iferr): move requires inside of a function

* refactor(impl): move some requires inside of functions

* refactor(installer): move requires inside of function

* refactor(struct_tags): move requires into function

* refactor(dap): move import into function

* refactor(utils): move import into functions
2022-12-19 11:47:43 +02:00
Smirnov Oleksandr
e8fe6c5b15
feat(config): add types annotation (#21) 2022-11-13 12:08:23 +00:00
Smirnov Oleksandr
f835464d7f
Some refactoring (#20)
* feat: move all lua api into `api` module

* feat: remove boilerplate code, add go work suport

* refactor(utils): separete module for health

* refactor(dap): remove copy-paste code

* fix: comment

* chore(lsp): disable type checking

* feat: add `go work` command
2022-10-07 14:31:54 +00:00
Smirnov Oleksandr
d65884b182 Fix linters (#19)
* fix selene

* chore(ci): pin stylua version
2022-09-22 18:20:37 +03:00
Smirnov Oleksandr
aa535e7ed1 feat: add dlv as dep 2022-09-22 17:54:49 +03:00
Smirnov Oleksandr
9f6e94f46f feat(health): add check for nvim-dap 2022-09-22 17:36:14 +03:00
Smirnov Oleksandr
413efcc9f2 feat(dap): fist naive implementaion 2022-09-22 17:28:04 +03:00
Smirnov Oleksandr
eb19ecdc05
Add iferr integration (#15)
* feat(iferr): add to installer & config

* feat(iferr): add first implementation

* docs(iferr): add
2022-07-07 14:19:07 +03:00
Smirnov Oleksandr
4b83da6d7f style: reformat all lua code 2022-07-07 14:09:48 +03:00