Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Git Graph plugin for neovim

License

NotificationsYou must be signed in to change notification settings

isakbm/gitgraph.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Git Graph plugin for neovim.

NOTE: this project is still very WIP and there is no help documentation aside from this README.md.

Roadmap - Goals

Completed

  • ✔️ 100% lua
  • ✔️ temporal topological order
  • ✔️ branches stick to their lane
  • ✔️ easy to spot merge commits and branch children
  • ✔️ hooks for easy extension withdiffview.nvim etc
  • ✔️ easily configurable date formats
  • ✔️ easily configurable highlight groups
  • ✔️ performant scrolling
  • ✔️ easy to follow branch crossings

Future

  • auto updating graph
  • performant load times for large repos

Screenshots

imageimage

Usage

Note that this is still very early days and things may rapidly change in the beginning

  {'isakbm/gitgraph.nvim',opts= {git_cmd="git",symbols= {merge_commit='M',commit='*',      },format= {timestamp='%H:%M:%S %d-%m-%Y',fields= {'hash','timestamp','author','branch_name','tag'},      },hooks= {on_select_commit=function(commit)print('selected commit:',commit.hash)end,on_select_range_commit=function(from,to)print('selected range:',from.hash,to.hash)end,      },    },keys= {      {"<leader>gl",function()require('gitgraph').draw({}, {all=true,max_count=5000 })end,desc="GitGraph - Draw",      },    },  },

View commit withDiffview.nvim

When in the git graph buffer you can openDiffview on the commit under the cursor withEnter.

When in visual mode you get theDiffview for the selected range.

  {'isakbm/gitgraph.nvim',dependencies= {'sindrets/diffview.nvim'},---@typeI.GGConfigopts= {hooks= {-- Check diff of a commiton_select_commit=function(commit)vim.notify('DiffviewOpen'..commit.hash..'^!')vim.cmd(':DiffviewOpen'..commit.hash..'^!')end,-- Check diff from commit a -> commit bon_select_range_commit=function(from,to)vim.notify('DiffviewOpen'..from.hash..'~1..'..to.hash)vim.cmd(':DiffviewOpen'..from.hash..'~1..'..to.hash)end,      },    },  },

Use custom symbols

For example, usekitty branch symbolsmore detail

symbols= {merge_commit='',commit='',merge_commit_end='',commit_end='',-- Advanced symbolsGVER='',GHOR='',GCLD='',GCRD='',GCLU='',GCRU='',GLRU='',GLRD='',GLUD='',GRUD='',GFORKU='',GFORKD='',GRUDCD='',GRUDCU='',GLUDCD='',GLUDCU='',GLRDCL='',GLRDCR='',GLRUCL='',GLRUCR='',  },

Keymaps

... more keymaps to come ...

Highlights Groups

commit information

  • 'GitGraphHash'
  • 'GitGraphTimestamp'
  • 'GitGraphAuthor'
  • 'GitGraphBranchName'
  • 'GitGraphBranchTag'
  • 'GitGraphBranchMsg'

branch colors

  • 'GitGraphBranch1'
  • 'GitGraphBranch2'
  • 'GitGraphBranch3'
  • 'GitGraphBranch4'
  • 'GitGraphBranch5'

About

Git Graph plugin for neovim

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors5

Languages


[8]ページ先頭

©2009-2025 Movatter.jp