From 388ef03cf804f5aac05677c3bc9b0d8e14015b6b Mon Sep 17 00:00:00 2001 From: Smirnov Oleksandr Date: Thu, 4 Apr 2024 16:59:54 +0300 Subject: [PATCH] update CONTRIBUTING.md --- CONTRIBUTING.md | 48 +++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 45 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b3a3c7b..39092b1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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 ```