Skip to content

A neovim plugin to manage github repos(list my repos, clone to local, create and upload to remote)

License

Notifications You must be signed in to change notification settings

zhangfuwen/github.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

github_nvim

A neovim plugin to manage github repos. It uses github command line tool (gh) to manage github repos so make sure you have gh installed and authorized.

Usage

github_nvim = require("github_nvim")
github_nvim.setup({})
require('telescope').load_extension('github_repos')

vim.keymap.set("n", "<leader>ghr", function()
    vim.cmd("Telescope github_repos")
end, { desc = "List github repos(for clone or open)", buffer = bufnr })

vim.keymap.set("n", "<leader>ghc", function()
    require("github_nvim").clone()
end, { desc = "Clone a github repo", buffer = bufnr })

vim.keymap.set("n", "<leader>ghn", function()
    require("github_nvim").create()
end, { desc = "New github repo", buffer = bufnr })

for those who are using lazy to manage plugins:

{
    'zhangfuwen/github.nvim',
    config = function()
        local github_nvim = require("github_nvim")
        github_nvim.setup({})
        require('telescope').load_extension('github_repos')

        vim.keymap.set("n", "<leader>ghr", function()
            vim.cmd("Telescope github_repos")
        end, { desc = "List github repos", buffer = bufnr })

        vim.keymap.set("n", "<leader>ghc", function()
            require("github_nvim").clone()
        end, { desc = "Clone a github repo", buffer = bufnr })

        vim.keymap.set("n", "<leader>ghn", function()
            require("github_nvim").create()
        end, { desc = "New github repo", buffer = bufnr })
    end
},

Format

The CI uses stylua to format the code; customize the formatting by editing .stylua.toml.

Test

See Running tests locally

CI

  • Auto generates doc from README.
  • Runs the nvim-busted-action for test.
  • Lints with stylua.

More

To see this template in action, take a look at my other plugins.

License MIT

About

A neovim plugin to manage github repos(list my repos, clone to local, create and upload to remote)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages