The Select Emoji Plugin (Smoji) is a simple and lightweight plugin for Neovim that provides a fast and efficient way to insert emojis into your commit messages. Inspired by the popular CLI tool gitmoji, this plugin aims to improve the commit message writing experience by presenting a prompt with a curated list of emojis.
- Fast and responsive emoji prompt within Neovim.
- Curated list of emojis sourced from gitmoji for meaningful commit messages.
- Easy-to-use interface with smooth emoji selection.
Use your preferred package manager for Neovim, such as Lazy, Vundle, or packer.nvim.
For example, using Lazy:
-
Add the following lines to your Neovim configuration file
"zakissimo/smoji.nvim", cmd = "Smoji", keys = { { "<leader><leader>e", "<cmd>Smoji<cr>", desc = "Git[e]moji" }, { "<C-e>", "<cmd>Smoji<cr>", desc = "Git[e]moji", mode = "i"}, { "<C-e>", "<cmd>Smoji<cr>", desc = "Git[e]moji", mode = "t"}, }, config = function() require("smoji") end,
-
Require smoji somewhere in your configuration file (if not done yet)
require("smoji")
-
Reload your Neovim configuration
-
When you are in insert mode, use the following command to trigger the emoji prompt:
:Smoji
-
The emoji prompt will pop up, displaying a list of emojis along with their meanings.
-
Navigate and select the desired emoji.
-
Press Enter to insert the selected emoji into your commit message.
You can customize the behavior of the Neovim Emoji Prompt Plugin by setting the following options in your Neovim configuration file.
By default, the plugin uses emojis from gitmoji. If you want to use a custom list of emojis, you can set this variable to a list of emoji strings. For example:
TODO!
TODO!
If you prefer to use custom mappings instead of :Smoji
command
vim.keymap.set("n", "<Leader><Leader>e", "<CMD>Smoji<CR>")
This plugin was inspired by the gitmoji CLI tool, which provides a list of emojis for use in commit messages.
If you find any issues or have suggestions for improvement, feel free to open an issue or submit a pull request on the GitHub repository.
Happy committing with emojis! πππ