Skip to content

rsreimer/codeowners.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

codeowners.nvim

A plugin for working with .github/CODEOWNERS.

The plugin has the following methods:

  • require("codeowners").get_buf_owner() returns the codeowner of the current buffer.
  • require("codeowners").get_owner(fullpath) returns the codeowner of the file path.
  • require("codeowners").reset() resets the cache.

A user command :CodeownersReset can be used to reset the codeowners cache.

Example for adding current buffers codeowner to lualine.nvim:

-- lazy.nvim
{
  "nvim-lualine/lualine.nvim",
  event = "VeryLazy",
  opts = function(_, opts)
    table.insert(opts.sections.lualine_x, 1, {
      function()
        return require("codeowners").get_buf_owner()
      end,
    })
  end,
}

Installation

-- lazy.nvim
{
  "rsreimer/codeowners.nvim",
  config = function()
    require("codeowners").setup()
  end,
}

About

neovim plugin for .github/CODEOWNERS

Topics

Resources

License

Stars

Watchers

Forks

Languages