Emoji.nvim Save

A plugin to search for and insert emojis/kaomojis right from Neovim 😀

Project README

emoji.nvim 😀

Neovim Lua

CI Update-emojis size issues last commit license release

❓ Why

This plugin allows you to easily search and insert emojis and kaomojis in your current buffer.

Though there are a couple of plugins (see Similar plugins and inspiration), I decided to make a 15th plugin. 😉

Jokes aside, I could not find a plugin that fulfills my wish for both telescope and cmp integration, so why not write a plugin myself?

💫 Features

  • Automatic updates of available emojis via GitHub actions (emojisource.app as source).
  • No dependencies (relies on vim.ui.select).
  • (Optional) telescope.nvim integration (emojis only).
  • (Optional) nvim-cmp integration (emojis only).

Screenshots

emojis via vim.ui

ui.png

Please note that I use dressing.nvim so your UI might look different!

kaomojis via vim.ui

kaomojis.png

Please note that I use dressing.nvim so your UI might look different!

telescope (emojis)

telescope.png

cmp (emojis)

cmp.png

🔧 Installation

With Lazy.nvim:

{
  "allaman/emoji.nvim",
  version = "1.0.0", -- optionally pin to a tag
  ft = "markdown", -- adjust to your needs
  dependencies = {
    -- optional for nvim-cmp integration
    "hrsh7th/nvim-cmp",
    -- optional for telescope integration
    "nvim-telescope/telescope.nvim",
  },
  opts = {
    -- default is false
    enable_cmp_integration = true,
    -- optional if your plugin installation directory
    -- is not vim.fn.stdpath("data") .. "/lazy/
    plugin_path = vim.fn.expand("$HOME/plugins/"),
  },
}

For nvim-cmp integration add emoji to your list of sources:

local sources = {
  { name = "nvim_lsp" },
  { name = "buffer", keyword_length = 5 },
  { name = "luasnip" },
  { name = "emoji" },
}

For telescope integration load the extension via:

require("telescope").load_extension("emoji")

💻 Use

Emojis

  1. :InsertEmoji respective lua require("emoji").insert() or :InsertEmojiByGroup respective lua require("emoji").insert_by_group() allows you to select an emoji that is inserted at your cursor's current position.
  2. :Telescope emoji does the same but invokes Telescope instead of vim.ui.select. (if telescope.nvim is installed).
  3. While in insert mode typing : triggers the auto-completion of nvim-cmp. (if nvim-cmp integration is enabled and configured).

Kaomojis

  1. :InsertKaomoji respective lua require("emoji").insert_kaomoji()
  2. :InsertKaomojiByGroup respective lua require("emoji").insert_kaomoji_by_group()

You can also create key bindings to your liking.

💡 Similar plugins and inspiration

♥️ Credits

Thanks to emojisource.app for providing its emoji API that is used in GitHub Actions to automatically update emojis.

Thanks to hines-r for providing kaomojis.json

Open Source Agenda is not affiliated with "Emoji.nvim" Project. README Source: Allaman/emoji.nvim
Stars
38
Open Issues
0
Last Commit
1 month ago
Repository
License
MIT

Open Source Agenda Badge

Open Source Agenda Rating