blink-emoji.nvim ๐Ÿ˜‰

May 24, 2025 ยท View on GitHub

An emoji source for blink.cmp.

๐ŸŽจ Features

  • Trigger on colon : (configurable).
  • Ghost text completion support.

๐Ÿ”จ Installation

๐Ÿ’ค lazy.nvim

{
  "saghen/blink.cmp",
  dependencies = {
      "moyiz/blink-emoji.nvim",
  },
  opts = {
    sources = {
      default = {
        ...
        "emoji",
      },
      providers = {
        emoji = {
          module = "blink-emoji",
          name = "Emoji",
          score_offset = 15, -- Tune by preference
          opts = {
            insert = true, -- Insert emoji (default) or complete its name
            ---@type string|table|fun():table
            trigger = function()
              return { ":" }
            end,
          },
          should_show_items = function()
            return vim.tbl_contains(
              -- Enable emoji completion only for git commits and markdown.
              -- By default, enabled for all file-types.
              { "gitcommit", "markdown" },
              vim.o.filetype
            )
          end,
        }
      }
    }
  }
}

๐Ÿ“˜ Usage

Press :.

๐Ÿ’ช Credit

Based on hrsh7th/cmp-emoji.

๐Ÿ“œ License

See License.