- Notifications
You must be signed in to change notification settings - Fork0
Neovim plugin to display git blame information in front of functions, structs and classes.
License
NotificationsYou must be signed in to change notification settings
robert-oleynik/git-blame-virt.nvim
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This plugin is not stable yet.
Displaygit blame
information of functions, structs and classes using Neovim's virt_lines and TreeSitter.
- Lua
- Rust
- C, C++
- Python
- Java
- JavaScript
- LaTeX
use {'robert-oleynik/git-blame-virt.nvim',requires= {'nvim-lua/plenary.nvim'},config=function()require'git-blame-virt'.setup {}end}
git-blame-virt can be configured using the setup function. Here is an example with the default settings:
require'git-blame-virt'.setup {allow_foreign_repos=true,display= {commit_hash=true,-- Enable/Disable latest commit hashcommit_summary=true,-- Enable/Disable latest commit summarycommit_committers=true,-- Enable/Disable committers listmax_committer=3,-- Limit Number of committers display in listcommit_time=true,-- Enable/Disable relative commit timehi='Comment',-- Change Highlight group of default highlight functionfn=function(...)-- See Custom Display Functionend},ft= {-- Enable/Disable plugin per filetypelua=true,java=true,javascript=true,latex=true,python=true,rust=true,cpp=true}}
require'git-blame-virt'.setup {-- ...display= {-- ...fn=function(info)-- Structure of info: {-- committers = { "<name>", ... },-- last = {-- hash = '000...',-- timestamp = 0,-- summary = '...',-- }-- }return {{'<text>','<higlight group>'},-- ...}end}}
Note: TreeSitter support for that language is required.
Add to your config before callingsetup
:
locallang=require'git-blame-virt.lang'lang.ts_queries['<your language>']=[[(class_definition) @node(function_definition) @node]]
Please note:@node
is required at the end of each statement.
For Documentation on TreeSitter Queries: seePattern Matching With Queries
About
Neovim plugin to display git blame information in front of functions, structs and classes.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published