-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
webdevicons - support for custom icons #392
Comments
Hmm, that could be partially supported. It's possible for the sync filter, I can make the icons used in vimscript overridable. vim-clap/autoload/clap/icon.vim Line 11 in ae4b745
But it's impossible to configure the icons used in Rust code https://github.com/liuchengxu/vim-clap/blob/master/crates/icon/src/constants.rs. I'm not sure if people can bare with these inconsistent icons. If people do want to change the icons used in Rust, the process is not convenient at present. He can update https://github.com/liuchengxu/vim-clap/blob/master/crates/icon/exactmatch_map.json, run |
They can't. This turns the plugin unusable with clap at the moment. One on the objectives from the plugin (for the far future) is to create a interface that is consistent across plugins, even if is there no relation between each. For example a icon for a
What about to read this values from a |
I'm reluctant as that's not the way of having optimal performance. If you can provide a JSON of emojis, I can consider make it a new builtin option. |
Definitely. But maybe that this is not so noticeable.
I can provide. Some emojis need to have a space together to render properly on Vim/NeoVim ('🅱' for example need to be writed as '🅱 '). So for now the chars need to be writted as strings. This can be done? I did see on the |
You are right, an extra space is neccessary when rendering, https://github.com/liuchengxu/vim-clap/blob/302dd2d718/autoload/clap/provider/grep.vim#L33. |
Yes. But not all chars ('💡' for example works fine, but '🅱' don't). Also some are fine on MacOS but are wrong on Linux. So I have to test each char for each platform. About Windows I don't know since I don't have one anymore, but last time that I did a test was working fine with GVim. If necessary I can provide a different json list for each platform, let's see. |
At moment I trying to figure out why Vim/NeoVim has so many problems rendering emojis. Some emojis are rendered just half, others keep showing on the screen (tests on Linux, Windows and Mac)... This is more complex than this issue on Clap, since we need to change on the Vim/NeoVim code base side. So I decided to create another plugin for icons based on NerdFonts and I will close this issue for now. I will turn public the new plugin until next week. |
I found a way to "solve". Basically some icons render right an others dont. So I need to use just the right icons. It will need some work, but works! @liuchengxu I will reopen this issue and provide a custom JSON to be used on this plugin. |
Hi @adelarsq, any progress on this issue? |
I plan to do a refactoring, to read all chars from a generated json, on next months. But I will need to detect the terminal for a good behaviour. So we will have a good behaviour even on Windows I think. At moment I'm using vim-clap with vim-emoji-icon-theme daily and it's behaving well on iTerm. Need some more testing on Kitty since I don't use so often. Edit: |
With #654, you can use the custom icons easier, just modify the json file in https://github.com/liuchengxu/vim-clap/tree/master/crates/icon directly and recompile the Rust binary. But PR is still welcome :(. |
* Generate the icon const table using build.rs Close #392 * Commit build.rs * Update CHANGELOG.md * . * .
@liuchengxu Nice! Thanks! I will add this feature on the next weeks 🙂 |
I'm creating a plugin (vim-emoji-icon-theme) that use webdevicons behind the scenes to allow use of emojis for filetypes instead of patched fonts.
For example NERDTree shows like this:
To support clap my plugin needs that this plugin use the icons provided by webdevicons (using something like the
WebDevIconsGetFileTypeSymbol(absolute_file_path)
function for example).Is it possible?
The text was updated successfully, but these errors were encountered: