Skip to content

jjcxdev/gitsignal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GitSignal

Never Commit Unsaved.

Lua Neovim

Git Signal

⇁ TOC

⇁ The Problem

Committing unsaved files is a common issue that can lead to incomplete commits, missed changes, and potential bugs. Developers often overlook unsaved files, especially in large projects with multiple buffers open in their editor. This can cause significant delays and complications in the development process.

⇁ The Solutions

GitSignal addresses this problem by providing a clear, visual indication of all unsaved files in the current Neovim session. By listing these files in a floating window, GitSignal helps you ensure that all changes are saved before committing, reducing the likelihood of incomplete commits and improving overall code quality.

⇁ Installation

Using Lazy.nvim

Add the following to your Lazy.nvim plugin list:

return {
    "jjcxdev/gitsignal",
}

Add the following to your packer.nvim configuration:

use "jjcxdev/gitsignal"

⇁ Getting Started

No additional configuration is required. Once installed, GitSignal will automatically display a floating window with unsaved files when Neovim starts.

However, if you'd like to customize the behavior, you can manually call the plugin's functions:

Commands

  • :Gitsignal
    Manually open the floating window listing unsaved files.

  • :CloseGitsignal
    Close the Git Signal floating window.

⇁ API

Config

Currently, GitSignal doesn't require any additional configuration. It works out of the box, but you can customize its appearance.

Settings

You can change the appearance of the floating window by modifying the highlight groups in your Neovim configuration:

vim.api.nvim_set_hl(0, "GitSignalNormalFloat", { bg = "NONE", fg = "NONE" })
vim.api.nvim_set_hl(0, "GitSignalFloatBorder", { bg = "NONE", fg = "#9d00ff" }) -- vibrant purple
vim.api.nvim_set_hl(0, "GitSignalUnsaved", { fg = "#e06c75", bold = true })

⇁ Contribution

Contributions are welcome! If you have ideas for improvements or have found a bug, feel free to open an issue or submit a pull request.

⇁ Social

For questions about GitSignal reach out to me on X.