Skip to content
프로젝트

aaronhallaert/advanced-git-search.nvim

GitHub에서 보기

aaronhallaert/advanced-git-search.nvim has 389 GitHub stars and 11 forks. Star changes are not measured yet. Last checked 2026-11-14 02:01 UTC. Last push 2025-12-09.

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
기록 수집 중
in 7 days
기록 수집 중
in 15 days
기록 수집 중
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

소개

Search your git history by commit message, content and author in Neovim

개발 도구

README.md

Original

🍃 Advanced Git Search

An advanced git search extension for Telescope and fzf-lua.

Search your git history by commit message, content and author in Neovim

🚀 Usage

Demo

  • 📖 Open a picker

    :AdvancedGitSearch or :AdvancedGitSearch {command}

  • 🔎 Enter a query

    Your usual search experience. See the individual commands for the grep behaviour.

  • ✏️ Further search on commit author with @

    The prompt is split on @. Everything following the @ is the pattern for the author name.

⚡️ Commands

1. search_log_content -- Search in repo log content

Opens a window with a list of all previous commit.

Grep behaviour: filter on added, updated or removed code (log content: -G option in git).

Keymaps

  • <CR> Opens a diff of the current file with the selected commit
  • <C-e> show the entire commit for all files in neovim with diff plugin
  • <C-o> Open the selected commit in the browser
  • <C-y> copy the commit hash to clipboard
  • <C-p> copy the commit patch for a single commit or a range to clipboard (currently telescope-only)
  • <C-w> cycle author, date and both in entry

2. search_log_content_file -- Search in file log content

Opens a window with a list of git commits that changed the current file (renames included).

Grep behaviour: filter on added, updated or removed code (log content: -G option in git).

Keymaps

  • <CR> Opens a diff of the current file with the selected commit
  • <C-e> show the entire commit for all files in neovim with diff plugin
  • <C-o> Open the selected commit in the browser
  • <C-y> copy the commit hash to clipboard
  • <C-p> copy the commit patch for a single commit or a range to clipboard (currently telescope-only)
  • <C-w> cycle author, date and both in entry

3. diff_commit_file -- Diff current file with commit

Opens a window with a list of git commits that changed the current file (renames included).

Grep behaviour: filter on commit message.

Keymaps

  • <CR> Opens a diff of the current file with the selected commit
  • <C-e> show the entire commit for all files in neovim with diff plugin
  • <C-o> Open the selected commit in the browser
  • <C-y> copy the commit hash to clipboard
  • <C-p> copy the commit patch for a single commit or a range to clipboard (currently telescope-only)
  • <C-w> cycle author, date and both in entry

4. diff_commit_line -- Diff current file with selected line history

Opens a window with a list of previous commit logs with respect to selected lines

Grep behaviour: filter on commit message.

Use :'<,'>AdvancedGitSearch diff_commit_line (with a visual range).

Keymaps

  • <CR> opens a diff for the current file with the corresponding file on the selected commit
  • <C-e> show the entire commit for all files in neovim with diff plugin
  • <C-o> opens a the selected commit in the browser
  • <C-y> copy the commit hash to clipboard
  • <C-p> copy the commit patch for a single commit or a range to clipboard (currently telescope-only)
  • <C-w> cycle author, date and both in entry

5. diff_branch_file -- Diff file with branch

Opens a window with a list of local branches

Grep behaviour: filter on branch name.

Keymaps

  • <CR> opens a diff for the current file with the selected branch

6. changed_on_branch -- Changed on current branch (experimental)

Opens a window with a list of changed files on the current branch (including staged files). The fork point of the current branch is determined with the following command:

git show-branch | \
    sed "s/].*//" | \
    grep "*" | \
    grep -v "$(git rev-parse --abbrev-ref HEAD)" | \
    head -n1 | \
    sed "s/^.*\\[//"

Note: this only works if there is already a commit on the current branch, otherwise the base branch can not be detected.

Grep behaviour: filter on filename.

Keymaps

  • <CR> opens the selected file.

7. checkout_reflog -- Checkout from reflog

Opens a window with all reflog entries

Keymaps

  • <CR> checkout the reflog entry

8. show_custom_functions

A telescope picker for all functions above. Enable show_builtin_git_pickers to additionally show builtin git pickers.

⚙️ Installation

Config

{
    -- Browse command to open commits in browser. Default fugitive GBrowse.
    -- {commit_hash} is the placeholder for the commit hash.
    browse_command = "GBrowse {commit_hash}",
    -- when {commit_hash} is not provided, the commit will be appended to the specified command seperated by a space
    -- browse_command = "GBrowse",
    -- => both will result in calling `:GBrowse commit`

    -- fugitive or diffview
    diff_plugin = "fugitive",
    -- customize git in previewer
    -- e.g. flags such as { "--no-pager" }, or { "-c", "delta.side-by-side=false" }
    git_flags = {},
    -- customize git diff in previewer
    -- e.g. flags such as { "--raw" }
    git_diff_flags = {},
    git_log_flags = {},
    -- Show builtin git pickers when executing "show_custom_functions" or :AdvancedGitSearch
    show_builtin_git_pickers = false,
    entry_default_author_or_date = "author", -- one of "author", "date" or "both"
    keymaps = {
        -- following keymaps can be overridden
        toggle_date_author = "<C-w>",
        open_commit_in_browser = "<C-o>",
        copy_commit_hash = "<C-y>",
        copy_commit_patch = "<C-p>", -- telescope only
        show_entire_commit = "<C-e>",
    }

    -- Telescope layout setup
    telescope_theme = {
        function_name_1 = {
            -- Theme options
        },
        function_name_2 = "dropdown"
        -- e.g. realistic example
        show_custom_functions = {
            layout_config = { width = 0.4, height = 0.4 },
        },

    }
}

Dependencies

{
    "nvim-telescope/telescope.nvim",
    -- to show diff splits and open commits in browser
    "tpope/vim-fugitive",
    -- to open commits in browser with fugitive
    "tpope/vim-rhubarb",
    -- optional: to replace the diff from fugitive with diffview.nvim
    -- (fugitive is still needed to open in browser)
    -- "sindrets/diffview.nvim",
}

Telescope

Lazy

To complete this snippet, see Config and Dependencies.

{
    "aaronhallaert/advanced-git-search.nvim",
    cmd = { "AdvancedGitSearch" },
    config = function()
        -- optional: setup telescope before loading the extension
        require("telescope").setup{
            -- move this to the place where you call the telescope setup function
            extensions = {
                advanced_git_search = {
                        -- See Config
                    }
            }
        }

        require("telescope").load_extension("advanced_git_search")
    end,
    dependencies = {
        --- See dependencies
    },
}
Packer

To complete this snippet, see Config and Dependencies.

use({
    "aaronhallaert/advanced-git-search.nvim",
    config = function()
        -- optional: setup telescope before loading the extension
        require("telescope").setup{
            -- move this to the place where you call the telescope setup function
            extensions = {
                advanced_git_search = {
                    -- Insert Config here
                }
            }
        }

        require("telescope").load_extension("advanced_git_search")
    end,
    requires = {
        -- Insert Dependencies here
    },
})

Fzf-lua

Lazy

To complete this snippet, see Config and Dependencies.

{
    "aaronhallaert/advanced-git-search.nvim",
    cmd = { "AdvancedGitSearch" },
    config = function()
        require("advanced_git_search.fzf").setup{
            -- Insert Config here
        }
    end,
    dependencies = {
        -- Insert Dependencies here
    },
}
Packer

To complete this snippet, see Config and Dependencies.

use({
    "aaronhallaert/advanced-git-search.nvim",
    config = function()
        require("advanced_git_search.fzf").setup{
                -- Insert Config here
            }
        }
    end,
    requires = {
        -- Insert Dependencies here
    },
})

Snacks

Lazy

To complete this snippet, see Config and Dependencies. Also see lua/spec/minimal_init_snacks.lua for an up-to-date version.

{
    "aaronhallaert/advanced-git-search.nvim",
    cmd = { "AdvancedGitSearch" },
    config = function()
        require("advanced_git_search.snacks").setup{
            -- Insert Config here
        }
    end,
    dependencies = {
      "folke/snacks.nvim"
    },
}
Packer

To complete this snippet, see Config and Dependencies.

use({
    "aaronhallaert/advanced-git-search.nvim",
    config = function()
        require("advanced_git_search.snacks").setup{
                -- Insert Config here
            }
        }
    end,
    requires = {
        -- Insert Dependencies here
    },
})

Prerequisites

  • git
  • vim-fugitive
  • sindrets/diffview.nvim
  • telescope.nvim

관련 프로젝트 살펴보기