Observe messages in bottom panel to see the codeowners of the file
Github CODEOWNERS plugin for neovim. This plugin will help you identify code ownership for the files you are editing or you can identify the owners in your Git history.
The plugin has standard structure so any method should work fine.
-- ~/.config/nvim/lua/plugins/gh-co.lua
return {
"comatory/gh-co.nvim",
config = function()
vim.keymap.set("n", "<leader>gg", ":GhCoWho<CR>", {})
end
}
Plug 'comatory/gh-co.nvim'
- Open repository that has
CODEOWNERS
file. Check that it's accessible using:GhCoShowFile
. - Open a file, run
:GhCoWho
. You will see codeowner(s) in the bottom panel as a message. - Open few different files with different owners, run
:GhCoWhos
, a new buffer with all the codeowners will be shown. - Get a git commit SHA from the repository history, run
:GhCoGitWho <sha>
to get a list of codeowners which affected given commit.
- show codeowner for currently opened file
- show codeowners for all opened buffers
- show codeowners for specific git commit via SHA
- locate & open CODEOWNERS file
- syntax highlighting for CODEOWNERS files
The plugin exposes several commands prefixed with GhCo*
. There are no default key bindings for running these so it's up to you to configure it.
Show whether plugin is running OK.
Shows plugin configuration.
Open CODEOWNERS file in a buffer.
Show codeowners for file in an active buffer.
Show codeowners for files in all buffers.
Show codeowners for files affected by commit SHA.
Project is using luarocks to manage dependencies. After cloning the repo run:
luarocks install --deps-only gh-co.nvim-0.0.5-1.rockspec
Run PATH="./lua_modules/bin:PATH" luacheck lua
to lint the codebase
Run luarocks test