A Unicode picker for telescope.nvim.
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",
},
}
There are currently two ways to activate the Unicode character picker:
- Through the
:Telescope unicode_picker
command - 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, {})
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 │
~ ╰──────────────────────────────────────────────────────────────────────────────╯