Skip to content
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

Add nvim-web-devicon support #44

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

katawful
Copy link

I like how devicons look, and noticed that the feature was lacking here. This PR features support for the popular Neovim devicon plugin nvim-web-devicons

Overview: the feature is disabled by default, to enable use the boolean key "devicons" inside your setup table. This will warn about if said devicon plugin is installed when devicon = true. All features currently present to dirbuf work with my testing. With devicons on, the line parser skips the icon and proceeding space after to grab the file name, leading to the same compatibility

Still getting used to this code base, so please let me know of anything that needs fixing. I would like to use the colors of nvim-web-devicons hl groups that plugins such as Telescope or fzf-lua achieve, but I need to break down how this plugin works more

@katawful
Copy link
Author

katawful commented Aug 1, 2022

Some behavior is broken due to trouble converting between bytes and UTF characters that nvim-web-devicons uses. Good chance that this implementation is bunk

@elihunter173
Copy link
Owner

Hi! Thank you for the PR. I'll try to take a closer look at it and test it out sometime this week.

First impressions is I like this feature. I've been wanting to overhaul / update the way directory buffers look and this is a nice place to start.

I would like to use the colors of nvim-web-devicons hl groups that plugins such as Telescope or fzf-lua achieve, but I need to break down how this plugin works more

Yeah syntax highlighting is... gross right now. I don't know how other plugins deal with devicons and highlight groups so they're probably a good place to look for that.

Some behavior is broken due to trouble converting between bytes and UTF characters that nvim-web-devicons uses. Good chance that this implementation is bunk

I'd need to check more into it, but this stack overflow post might have a solution: https://stackoverflow.com/questions/22954073/lua-gmatch-odd-characters-slovak-alphabet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants