Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/amzd/dontforgit.nvim
Don't forget to commit and push your changes anymore! NeoVim plugin.
https://github.com/amzd/dontforgit.nvim
Last synced: about 1 month ago
JSON representation
Don't forget to commit and push your changes anymore! NeoVim plugin.
- Host: GitHub
- URL: https://github.com/amzd/dontforgit.nvim
- Owner: Amzd
- Created: 2024-02-11T11:52:28.000Z (11 months ago)
- Default Branch: master
- Last Pushed: 2024-04-21T15:23:55.000Z (8 months ago)
- Last Synced: 2024-05-02T03:26:26.328Z (8 months ago)
- Language: Lua
- Homepage:
- Size: 11.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# dontforgit.nvim
Don't forget to commit and push your changes anymore!
If you are like me and often quit NeoVim without committing or pushing, this plugin will remind you to do so.
https://github.com/Amzd/dontforgit.nvim/assets/17001151/4452a19b-59dd-4a1b-825f-d3d53de54444
## Installation
```lua
{
"amzd/dontforgit.nvim",
config = function()
require("dontforgit").setup()
end
}
```
Options```lua
require("dontforgit").setup {
-- If you often work in projects without git then turn this off to stop this plugin pestering you
notify_git_failed = true,
-- If you want to use a different git command (eg for dotfiles when in home directory) you can do so here
git_command = "!git",
-- If you always do `:!git ` then you can set this to "!git " to save typing
-- or if you want to use fugitive you might want to set this to "Git " or ""
prompt_prefix = "!",
-- Wether to add `-s -b` to `git status` command
compact = false,
-- Disable the hint
disable_hint = false
}
```## Usage
Quit NeoVim without committing or pushing and you will be prompted to do so.
When you have committed and pushed everything it automatically quits.
You can force close using ``, ``, or `:q` without committing everything.
To run git status again you can just `` without any input (either empty string or same as config.prompt_prefix).
## How it works
This plugin hooks the `VimLeavePre` event and blocks nvim shutting down by using `vim.ui.input` in a loop.