Skip to content

Latest commit

 

History

History
79 lines (63 loc) · 2.66 KB

README.md

File metadata and controls

79 lines (63 loc) · 2.66 KB

unicode_picker.nvim

A Unicode picker for telescope.nvim.

Installation

Using lazy.nvim with Luarocks support (version 11.x):

{
    "cosmicboots/unicode_picker.nvim",
    dependencies = {
        "nvim-telescope/telescope.nvim",
    },
    config = true,
}

Using lazy.nvim without Luarocks (before 11.x):

{
    "cosmicboots/unicode_picker.nvim",
    dependencies = {
        "uga-rosa/utf8.nvim",
        "nvim-telescope/telescope.nvim",
    },
}

Using packer.nvim:

use {
    "cosmicboots/unicode_picker.nvim",
    requires = {
        "uga-rosa/utf8.nvim",
        "nvim-telescope/telescope.nvim",
    },
}

Usage

There are currently two ways to activate the Unicode character picker:

  1. Through the :Telescope unicode_picker command
  2. Through the Lua interface

A simple keybind to activate the picker via the Lua interface could look like the following:

local unicode_picker = require("unicode_picker")
unicode_picker.setup()
vim.keymap.set("i", "<C-j>", unicode_picker.unicode_chars, {})

Digraph Support

The drop-down picker will attempt to show vim digraphs alongside their Unicode representation.

For example, the for all symbol (∀) uses the FA digraph:

1   _⤶
~   ╭────────────────────────── Pick a unicode character ──────────────────────────╮
~   │> forall|                                                          380 / 29974│
~   ├──────────────────────────────────────────────────────────────────────────────┤
~   │> [∀] (FA): 2200 FOR ALL universal quantifier                                 │
~   │  [䷈]: 4DC8 HEXAGRAM FOR SMALL TAMING                                         │
~   │  [䷽]: 4DFD HEXAGRAM FOR SMALL PREPONDERANCE                                  │
~   │  [ᴰ]: 1D30  TETRAGRAM FOR KEEPING SMALL                                      │
~   │  [ὒ]: 1F52  INPUT SYMBOL FOR LATIN SMALL LETTERS                             │
~   ╰──────────────────────────────────────────────────────────────────────────────╯