From 6ef4990417dcd47fcae19af14858e2e67e8b1632 Mon Sep 17 00:00:00 2001 From: linrongbin16 Date: Fri, 16 Jun 2023 17:19:01 +0800 Subject: [PATCH] feat: add contribution --- CONTRIBUTE.md | 18 ++++++++++++++++++ README.md | 10 ---------- lua/gitlinker.lua | 2 ++ 3 files changed, 20 insertions(+), 10 deletions(-) create mode 100644 CONTRIBUTE.md diff --git a/CONTRIBUTE.md b/CONTRIBUTE.md new file mode 100644 index 0000000..56df80e --- /dev/null +++ b/CONTRIBUTE.md @@ -0,0 +1,18 @@ +# Contribute + +## Lint + +Use [lua-language-server](https://github.com/LuaLS/lua-language-server) for code +lint. + +## Formatting + +Use [stylua](https://github.com/JohnnyMorganz/StyLua) for code formatting. + +## Test + +Start neovim and run: + +```lua +require('gitlinker.test.test_rules') +``` diff --git a/README.md b/README.md index 0eb2d70..d2e840f 100644 --- a/README.md +++ b/README.md @@ -194,13 +194,3 @@ require('gitlinker').setup({ file_log = false, }) ```` - -## Contribute - -### Code format - -Use [stylua](https://github.com/JohnnyMorganz/StyLua) for code formatting. - -### Test pattern rules - -Run test cases in [lua/gitlinker/test](https://github.com/linrongbin16/gitlinker.nvim/tree/master/lua/gitlinker/test). diff --git a/lua/gitlinker.lua b/lua/gitlinker.lua index 7b8e6ae..d621d49 100644 --- a/lua/gitlinker.lua +++ b/lua/gitlinker.lua @@ -311,6 +311,8 @@ end local M = { setup = setup, link = link, + -- for unit testing + map_remote_to_host = map_remote_to_host, } return M