update CONTRIBUTING.md

This commit is contained in:
Smirnov Oleksandr 2024-04-04 16:59:54 +03:00
parent c9b7d35cbd
commit 388ef03cf8

View file

@ -1,6 +1,14 @@
# 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
@ -8,6 +16,40 @@ Code is formatted by [stylua](https://github.com/JohnnyMorganz/StyLua) and linte
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
```