Async git branch in neovim
49f43fb5 — zethra 5 months ago
Add exit fn
6f14b9f9 — zethra 5 months ago
Remove onExit NOOP if git not found
fb11e1b5 — zethra 5 months ago
Exit fix


browse  log 



You can also use your local clone with git send-email.

#Neovim Async Git Status

Only works on Linux

This project is somewhat of an experiment into writing vim plugins in Rust. I wrote this plugin because I wanted to have my git branch in my statusline without having to run git over and over again. And without using a large git plugin.

So I wrote this plugin. It's fairly simple, I listens for modifications to .git/HEAD, then sets g:async_git_status to the branch name. So you can just include g:async_git_status in your status line and call it a day.

#How to use

  • Install the plugin using your preferred method
  • Either download the compiled binary and put it you path or compile it yourself
  • Put g:async_git_status in your statusline.
  • Profit!

#Technical details

I wanted to use async Rust so I decided to forgo the existing neovim rpc Rust libraries. I found a library called rmp-futures which provided a nice async msgpack-rpc client. Then I used smol as my runtime and inotify to detect file system changes.