Skip to content

Commit

Permalink
sync develop and main (#68)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
4 people committed Jun 15, 2024
1 parent ac27f4b commit a995af3
Show file tree
Hide file tree
Showing 47 changed files with 1,594 additions and 737 deletions.
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8

[*.{md,yml,yaml,toml,lua,vim}]
indent_size = 2

[*.go]
indent_style = tab
indent_size = 4
24 changes: 0 additions & 24 deletions .github/workflows/ci.yml

This file was deleted.

19 changes: 19 additions & 0 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: linters
on: [push, pull_request]

jobs:
linters:
name: linters
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: JohnnyMorganz/stylua-action@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: latest
args: --check .

- uses: NTBBloodbath/selene-action@v1.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: .
44 changes: 44 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: tests
on: [push, pull_request]

jobs:
tests:
strategy:
matrix:
os: [ubuntu-latest]
nvim_version:
- nightly
- v0.7.0
- v0.7.2
- v0.8.0
- v0.8.1
- v0.8.2
- v0.8.3
- v0.9.0
- v0.9.1
- v0.9.2
- v0.9.4
- v0.9.5
runs-on: ${{ matrix.os }}
steps:
- name: Install Task
uses: arduino/setup-task@v1
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/checkout@v3

- name: Install Neovim
run: |
mkdir -p /tmp/nvim
wget -q https://github.com/neovim/neovim/releases/download/${{ matrix.nvim_version }}/nvim.appimage -O /tmp/nvim/nvim.appimage
cd /tmp/nvim
chmod a+x ./nvim.appimage
./nvim.appimage --appimage-extract
echo "/tmp/nvim/squashfs-root/usr/bin/" >> $GITHUB_PATH
- name: Run Tests
run: |
nvim --version
task test
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
playground/
/playground/
/.tests/
10 changes: 10 additions & 0 deletions .luarc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"diagnostics.globals": [
"describe",
"it",
"before_each",
"after_each",
"before_all",
"after_all"
]
}
15 changes: 0 additions & 15 deletions .pre-commit-config.yaml

This file was deleted.

48 changes: 45 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,55 @@
# Contributing to `gopher.nvim`

Thank you for looking to contributing
Thank you for taking the time to submit some code to gopher.nvim. It means a lot!

### Task running

In this codebase for running tasks is used [Taskfile](https://taskfile.dev).
You can install it with:
```bash
go install github.com/go-task/task/v3/cmd/task@latest
```

### Styling and formatting

Code is formatted by [stylua](https://github.com/JohnnyMorganz/StyLua) and linted using [selene](https://github.com/Kampfkarren/selene).
You can install these with:

```bash
cargo install stylua
cargo install selene
sudo pacman -S selene stylua
# or whatever is your package manager
# or way of installing pkgs
```

For formatting use this following commands, or setup your editor to integrate with selene/stylua:
```bash
task format
task format:check # will check if your code formatted
task lint
```

### Documentation

Here we are using [mini.doc](https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-doc.md)
for generating help files based on EmmyLua-like annotations in comments

You can generate docs with:
```bash
task docgen
```

### Commit messages
We use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/), please follow it.

### Testing

For testing this plugins uses [plenary.nvim](https://github.com/nvim-lua/plenary.nvim).
All tests live in [/spec](https://github.com/olexsmir/gopher.nvim/tree/main/spec) dir.

You can run tests with:
```bash
task test
# also there are some aliases for that
task tests
task spec
```
11 changes: 0 additions & 11 deletions Makefile

This file was deleted.

0 comments on commit a995af3

Please sign in to comment.