ziontee113 / icon-picker.nvim Goto Github PK
View Code? Open in Web Editor NEWThis is a Neovim plugin that helps you pick Nerd Font Icons, Symbols & Emojis
License: MIT License
This is a Neovim plugin that helps you pick Nerd Font Icons, Symbols & Emojis
License: MIT License
that first screenshot (right under the two screencapture videos) in the README is sooo crispy
what font is that? what terminal are you using? how did you get it to be so sharp?
my neovim is not as pretty when I have popup floats like the icon-picker one in that screenshot :(
Hi, I like your plugin very much, but I found a problem in insert mode.
In Insert mode, the icon is added after the letter behind the cursor
I modified the function to get what I wanted
local function insert_user_choice_insert(choice)
if choice then
local split = vim.split(choice, " ")
vim.api.nvim_put({ split[1] }, "", false, false)
vim.api.nvim_feedkeys("a", "t", false)
end
end
I don't know if this is a bug
The correct link is: https://github.com/nvim-telescope/telescope.nvim
Is it possible to install with vim-plug
The use of patched fonts with nerd-icons v3.0.0 leads to some icons being displayed badly or not at all.
Both code points and class names have changed.
Informations here
Also, it seems that the list of icons is not up to date.
From the i_md.sh script it is simple to update nf-icon-list.lua. Some icons are not available anymore.
As it's a breaking change that can be annoying for people using nerd-fonts < v3.0.0 and I'm not sure you want to integrate all these changes, I don't propose a PR. I can do that (first time) if youβre ok with these changes.
Maybe you should provide a v3.0.0 branch ?
As mentioned in #7, I think there is an opportunity to improve the API of this package. Namely, shifting the focus around the actions as opposed to the symbols. From my point of view, this would have two main benefits:
n_actions * n_icon_sets
;Emoji + Nerd
.I think the easiest way to accomplish this is by making it into a lua package that exposes actions. Here is a very rough mock up of what the API could look like:
-- Option 1: one method option
require('icon-picker').select({ mode = "yank", icons = {"emoji", "nerd"} })
require('icon-picker').select() -- default to mode='paste' and icons='everything'
-- Option 2: two method option
require('icon-picker').paste({ icons = {"emoji", "nerd"} }) -- combine icon sets
require('icon-picker').yank() -- default to icons='everything'
You may have noticed that I did not add insert mode as an option. The reason is that my hunch is that it is more of a matter of how you set the keybinding, as opposed to the actual function that is being used. Here is an example of how I imagine the key map could be set:
vim.keymap.set({'n', 'i'}, "<c-i>", function()
-- paste the selection in both 'normal' and 'insert' modes when ctrl + i is pressed
require('icon-picker').select({ mode = "paste", icons = {"emoji", "nerd"} })
end)
Some of the newer icons from nerdfonts are missing from the tables.
For example, the neovim icons nf-custom-neovim
and nf-linux-neovim
.
Is there a script to regenerate the icon tables or are entries added manually?
Can you add a section in readme for installation through lazy?
Thanks
Hey, thanks for creating this plugin! I didn't know I needed it π
When I wanted to try it out, the insert mode mapping suggested in the README didn't work for me. It inserted a Tab instead. It turns out that C-i
is sent as <Tab>
from the terminal to vim. Even though the mapping was listed in :imap <C-i>
, Tab was inserted instead of opening the emoji picker.
I was able to use <C-o>:PickIconsInsert<CR>
in insert mode, so it was up to the <C-i>
mapping that was sent as <Tab>
by the terminal.
I reckon I may not be the only one with this problem. Perhaps changing the default insert-mode binding to <C-e>
will let other users avoid this problem.
For reference, I am using kitty as my terminal
19:27 $ kitty -v
kitty 0.25.2 created by Kovid Goyal
I also checked in gnome-terminal
and it also sent <C-i>
as <Tab>
.
Please consider creating a simple vimdoc for your plugin so that we can view its commands from :help
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.