···4455This plugin retrieves the latest revision description (commit message) from `jj` and lets you use it through a global variable. It's nice to see the description of what you are working on at the moment.
6677+## Requirements
88+99+- Neovim 0.10 or newer
1010+- `jj` installed and available on `PATH`
1111+1212+## How do I use it?
1313+1414+Once you connect a plugin, it will automatically set the `vim.b.jj_desc` variable, which contains the description or `nil`. If your currently open buffer is not a file, (e.g. terminal) `vim.b.jj_desc` will return `nil`. Make sure to handle that case in your configuration!
1515+716## Example with NvChad
817918```lua
···2130 jj_msg = function()
2231 local result = vim.b.jj_desc -- The variable you need
23322424- if not result then
3333+ if not result then -- Null handling - just don't display anything
2534 return ""
2635 end
2727-2828- return "%#St_JJ_Text# " .. result .. " "
3636+3737+ -- May look bad online - I am using a Nerd Font commit icon here
3838+ return "%#St_JJ_Text# " .. result .. " " -- Decorating the description
2939 end,
3040 }
3141 }
···34443545```
36464747+And here comes the result!
4848+4949+
5050+3751## Setup
38523953**Lazy**
···4559```
46604761I'll be happy to add other package manager instructions! Hit me up, open an issue, or send a PR
6262+6363+## Contributing?
6464+6565+You can do so much to help me develop this plugin:
6666+6767+- Try to break it and open an issue
6868+- Try to fix it and open a PR
6969+- Most importantly, spread the word about it