dirbuf.nvim
dirbuf.nvim copied to clipboard
Add nvim-web-devicon support
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
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
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