Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

hunk-inline.nvim

the hunk-inline.nvim is a plugin that enables displaying and submitting hunk comments directly within Neovim.

demo

Configuration

You can configurate this plugin like this if you use lazy.nvim.

return {
  {
    "tominaga-h/hunk-inline.nvim",
    config = function()
      local hunk = require("hunk-inline")

      vim.keymap.set("n", "<leader>hc", hunk.add_comment, { desc = "Hunk: add inline comment" })
      vim.keymap.set("n", "<leader>hr", function()
        hunk.refresh_comments(false)
      end, { desc = "Hunk: refresh hunk comments" })
      vim.keymap.set("n", "<leader>hx", hunk.clear_comments, { desc = "Hunk: clear display" })

      -- Automatic fetch when viewing files (*Pass true if you want to suppress error notifications during automatic updates)
      vim.api.nvim_create_autocmd({ "BufEnter", "FocusGained" }, {
        pattern = "*",
        callback = function()
          hunk.refresh_comments(true) -- silent = true
        end,
      })
    end,
  },
}

About

A plugin can display & submit hunk comments within Neovim

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages