diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b03e962..624e992 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,16 +3,17 @@ ## Table of Contents - [Issues](#issues) - * [Bugs/Issues](#bugsissues) - * [Feature Requests](#feature-requests) + - [Bugs/Issues](#bugsissues) + - [Feature Requests](#feature-requests) - [Pull Requests](#pull-requests) - * [Easily use StyLua and Luacheck](#easily-use-stylua-and-luacheck) - + [Using `act`](#using-act) - - [First time setup](#first-time-setup) - - [Using `act`](#using-act-1) - * [Luacheck Issues](#luacheck-issues) - * [StyLua Issues](#stylua-issues) - + - [Make sure code is up to standards](#make-sure-code-is-up-to-standards) + - [Using StyLua and Luacheck directly](#using-stylua-and-luacheck-directly) + - [Using `act`](#using-act) + - [First time setup](#first-time-setup) + - [Using `act`](#using-act) + - [Luacheck Issues](#luacheck-issues) + - [StyLua Issues](#stylua-issues) +- [Assets](#assets) ## Issues @@ -72,7 +73,25 @@ To have your PR merged more quickly you'll need to keep the following things in used to. But please use Conventional commits for the PR title (and description if aplicable) for better readability and better commit message when the PR is squashed and merged. -### Easily use StyLua and Luacheck +### Make sure code is up to standards + +#### Using StyLua and Luacheck directly + +To run Luacheck use the following command in the repository's root directory: + +```bash +luacheck --config .luacheckrc . +``` + +To format using StyLua first make sure that you're using StyLua `0.20.0` (`stylua --version`) +to prevent any formatting changes between the versions. Then you can run the following command to +format the code: + +```bash +stylua . +``` + +#### Using `act` If you don't want to mess around with StyLua and Luacheck you can use [`act`](). It's a runner for Github workflows that allows you to run them locally. @@ -83,7 +102,6 @@ it's merged. If you use `nix` and `direnv` I've setup `default.nix` and `.envrc` files in the project's root for easy environment setup. -#### Using `act` ##### First time setup @@ -205,3 +223,10 @@ Look a bit above in the output to see it: To fix these issues you can either manually modify the file using the diff or you can run `stylua .` and it will apply the formatting automatically. + +## Assets + +All the assets are in the [`file_assets.lua`](lua/presence/file_assets.lua). + +If you'd like to add/modify any assets create a PR to the mentioned +[`file_assets.lua`](lua/presence/file_assets.lua). diff --git a/README.md b/README.md index 4bd89f9..ce15120 100644 --- a/README.md +++ b/README.md @@ -137,26 +137,19 @@ OS may not yet be supported ## Development - Clone the repo: `git clone https://github.com/jiriks74/presence.nvim.git` -- Enable [logging](#configuration) and ensure that `presence.nvim` is **_not_** +- Enable [logging](#configuration) and ensure that `presence.nvim` is **not** in the list of vim plugins in your config - Run `nvim` with your local changes: `nvim --cmd 'set rtp+=path/to/your/local/presence.nvim' file.txt` -- Ensure that there are no [luacheck](https://github.com/mpeterv/luacheck/) -errors: `luacheck lua` +- Make sure that your contribution follows +[CONTRIBUTING.md](https://github.com/jiriks74/presence.nvim/blob/main/CONTRIBUTING.md) +guidelines before creating a PR. ## Contributing -**Please use [Conventional Commits](https://www.conventionalcommits.org/) -if you want to contribute. -It makes everyones jobs easier.** - -**This project uses [StyLua](https://github.com/JohnnyMorganz/StyLua). -Please format your code using StyLua for better readability** +**Please read [CONTRIBUTING.md](https://github.com/jiriks74/presence.nvim/blob/main/CONTRIBUTING.md) +before creating a PR or an issue.** Pull requests are very welcome, feel free to open an issue to work on -or message [me (@jiriks74)](https://discordapp.com/users/517810049360461837) on my +or [message me directly (@jiriks74)](https://discordapp.com/users/517810049360461837) on my [Discord server](https://discord.gg/cCq3qcB4jB)! - -Asset additions and changes are also welcome! Supported file types can be found in -[`file_assets.lua`](lua/presence/file_assets.lua) and their referenced asset files -can be found in [the `icon-assets` branch](https://github.com/jiriks74/presence.nvim/tree/icon-assets).