A Neovim plugin that provides an interactive interface for making conventional commits with file selection and automatic git push functionality.
This plugin is designed to streamline your git workflow by providing a simple, visual way to:
- Add changed files to staging area
- Commit with conventional commit messages
- Push to remote repository
All in a single, interactive workflow without leaving Neovim. Perfect for developers who want a quick, consistent, and foolproof way to commit and push their changes following conventional commit standards.
- Interactive File Selection: Visual interface to select which changed files to commit
- Git Status Indicators: Visual status indicators with colors for file changes:
[+](green) for new/untracked and staged files[-](red) for deleted files[M](yellow) for modified files[R](yellow) for renamed files[C](yellow) for copied files[?](white) for unknown status
- Conventional Commits: Built-in support for conventional commit prefixes
- User-Friendly Interface: Navigate with vim-like keybindings
- Automatic Push: Option to push commits immediately after creation
- Customizable Prefixes: Configure your own conventional commit prefixes
- Git Repository Detection: Automatically detects if you're in a git repository
- Error Handling: Clear error messages for common issues
Plug 'Morass/conventional-push.nvim'use {
'Morass/conventional-push.nvim',
config = function()
require('conventional-push').setup()
end
}{
'Morass/conventional-push.nvim',
config = function()
require('conventional-push').setup()
end
}- Open any file in a git repository
- Run the command
:ConventionalPush - Follow the interactive prompts:
- File Selection: Select files to commit using
a(add),d(deselect),t(toggle) - Confirmation: Review your selected files
- Prefix Selection: Choose a conventional commit prefix
- Message Input: Enter your commit message
- Push Confirmation: Choose whether to push immediately
- File Selection: Select files to commit using
j/k- Navigate up/downa- Add/select current filed- Deselect current filet- Toggle selection of current file- Navigate to "Select All" and press
aortto select all files Enter- Continue to next screenq- Quit
Enter- Continue to prefix selectionq- Go back to file selection
j/k- Navigate up/downEnter- Select prefix and continueq- Go back to confirmation
- Type your commit message after the prefix
Enter- Create commit and continueEsc- Go back to prefix selection
j/k- Navigate between Yes/NoEnter- Confirm selection- No
qoption (you must choose Yes or No)
Enter- Close the plugin
The plugin comes with sensible defaults, but you can customize it:
require('conventional-push').setup({
prefixes = {'chore', 'fix', 'docs', 'feat', 'test', 'refactor', 'style', 'build', 'perf', 'debug', 'ci', 'revert', 'merge'}
})You can also configure the prefixes using vim script in your ~/.vimrc:
let g:conventional_push_prefixes = ['feat', 'fix', 'docs', 'style', 'refactor', 'test', 'chore']The default prefixes follow conventional commit standards:
- feat: A new feature
- fix: A bug fix
- docs: Documentation only changes
- style: Changes that do not affect the meaning of the code (white-space, formatting, etc)
- refactor: A code change that neither fixes a bug nor adds a feature
- test: Adding missing tests or correcting existing tests
- chore: Changes to the build process or auxiliary tools and libraries
- build: Changes that affect the build system or external dependencies
- perf: A code change that improves performance
- debug: Temporary commits for debugging purposes
- ci: Changes to CI configuration files and scripts
- revert: Reverts a previous commit
- merge: Merge commits
- Repository Check: Verifies you're in a git repository
- File Detection: Uses
git status --porcelainto find changed files - Interactive Selection: Presents files in a popup window with selection interface
- Validation: Ensures at least one file is selected before proceeding
- Prefix Selection: Shows configured conventional commit prefixes
- Message Input: Allows entering commit message with prefix pre-filled
- Git Operations: Executes
git add,git commit, and optionallygit push - Push Handling: Automatically handles first-time pushes with upstream setup
The plugin uses git's porcelain format to detect file states:
[+]New/Added: New files (untracked) and staged files (ready to commit)[M]Modified: Files with changes (either staged or unstaged)[-]Deleted: Files that have been deleted (either staged or unstaged)[R]Renamed: Files that have been renamed (staged)[C]Copied: Files that have been copied (staged)[?]Unknown: Files with unknown git status
Note: Both untracked files and staged files show [+] in green for easy identification of "addable" content.
The plugin provides clear error messages for common scenarios:
- Not in a git repository
- No changed files found
- No files selected
- Empty commit message
- Git command failures
- telescope-cc.nvim - Telescope integration for conventional commits
- cmp-conventionalcommits - nvim-cmp source for conventional commit autocomplete
- Commitizen CLI - Command line tool for conventional commits
- Commitizen Tools - Python tool for conventional commits with version bumping
- vim-fugitive - Comprehensive git wrapper for Vim
- neogit - Magit clone for Neovim
- lazygit.nvim - Lazygit terminal UI integration
- gitsigns.nvim - Git decorations and hunk operations
This plugin focuses specifically on the Add → Commit → Push pipeline with an emphasis on:
- Interactive file selection in a popup window
- Built-in conventional commit prefix selection
- Streamlined workflow from file changes to remote push
- No external dependencies (works with just git)
- Neovim 0.5+
- Git installed and configured
- Working git repository
- Terminal with color support (plugin uses cterm colors for visual feedback)
Contributions are welcome! Please feel free to submit a Pull Request or report an issue.
MIT License - see LICENSE file for details.
- Ensure you're using Neovim 0.5 or later
- Check that the plugin is properly installed
- Verify your configuration syntax
- Ensure you're in a git repository
- Check that git is properly configured
- Verify you have necessary permissions for the repository
- Make sure you have uncommitted changes
- Check that
git statusshows changed files - Ensure you're in the correct directory
- Verify you have push permissions to the remote repository
- Check your git remote configuration
- Ensure you're authenticated with your git providermodified
