Neovim plugin that creates a github issue from the current comment under your cursor. Then it will add the issue number to the end of the comment.
Repo owner, repo, assignees and labels are sored to a json and read when the plugin is ran again so the plugin will remember the details of the last repo you worked on.
This means you only enter details once then unless you want to change them issue creation is as simple as, write comment, leader gi leader gc.
Json is stored in ".local/share/nvim".
- curl (for GitHub API access)
- A GitHub Personal Access Token with the
reposcope
The usual way you install plugins.
"OwlfaceGames/issue-from-comment.nvim"Create a file called issue-from-comment in your plugins folder and paste the below settings. Change the keybinds if you like.
-- In your plugins configuration
return {
"OwlfaceGames/issue-from-comment.nvim",
config = function()
require("issue_from_comment").setup({
create_key = '<Leader>gc', -- Custom key to create the issue
cancel_key = 'q', -- Custom key to cancel
})
-- Keymapping to open the issue creation buffer
vim.keymap.set("n", "<Leader>gi", ":GHIssueFromComment<CR>", { noremap = true, silent = true })
end,
}This plugin requires a GitHub Personal Access Token with the repo scope:
- Go to GitHub Settings → Developer settings → Personal access tokens → Tokens (classic)
- Click "Generate new token" and select "Generate new token (classic)"
- Give it a descriptive name like "Neovim issue-from-comment plugin"
- Select the
reposcope (orpublic_repofor public repositories only) - Click "Generate token" and copy the token
Then, set the token in one of these ways:
Add this to your shell configuration (.bashrc, .zshrc, etc.):
export GITHUB_TOKEN="your-token-here"Add the token directly in your Neovim config (less secure):
require('issue_from_comment').setup({
github_token = "your-token-here",
})If you like my work, consider supporting me through GitHub Sponsors🩷
Distributed under the MIT License. See LICENSE for more information.
