So, the Denite filter appears to be pretty fragile — and it also throws away a lot of the information visible in Denite's lines.
Compare below screenshots.


More importantly, it also discards the source (a Denite concept) of the result from the output — in the former image, as an example, the first two results are buffers, and the rest are files; but they are indistinguishable in the latter.
I'd suggest you simply prepend the icon to the filename that you found, wherever it exists in the line (i.e. a buffer-listing should be 2 %a ICON lib/ocameel.ml [ocaml] (...).
[x] What version of vim are you using?
NVIM v0.2.1-331-g6650588c
Build type: RelWithDebInfo
Compilation: /usr/local/Homebrew/Library/Homebrew/shims/super/clang -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_MSGPACK_HAS_FLOAT32 -O2 -g -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -I/tmp/neovim-20170614-52857-dmx2ql/build/config -I/tmp/neovim-20170614-52857-dmx2ql/src -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/opt/gettext/include -I/usr/include -I/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include -I/tmp/neovim-20170614-52857-dmx2ql/build/src/nvim/auto -I/tmp/neovim-20170614-52857-dmx2ql/build/include
Compiled by [email protected]
Optional features included (+) or not (-): +acl +iconv +jemalloc +tui
For differences from Vim, see :help vim-differences
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/usr/local/Cellar/neovim/HEAD-6650588/share/nvim"
[x] What version of vim-devicons are you using: 0.9.3
@ELLIOTTCABLE Thanks! I'll have to look into it :smile:
I'm in the middle of learning some Vimscript — I might have a second later today to look at your filter, and try and improve upon it. (I'm assuming you're not, yourself, a Denite user?)
I don't want to make promises I can't keep, though; hard ‘maybe.’ 🤣
Not really a Denite user (though it is very cool). I just have been using Vim a lot less these days unfortunately too.
No worries, one of us or someone else could get to making the improvement. :crossed_fingers:
+1 to this. Not sure if it's the exact same issue, but when I enable dev-icons while using Denite, the following happens. It goes from this screenshot below:

To this:

The only difference is enabling the dev-icons plugin. The only custom code I have for this plugin is to call
if exists("g:loaded_webdevicons")
call webdevicons#refresh()
endif
at some point to fix the bug where sourcing the config file breaks the icons.
The above screenshots come from just running :Denite buffer
Should be fixed with #229
Most helpful comment
+1 to this. Not sure if it's the exact same issue, but when I enable dev-icons while using Denite, the following happens. It goes from this screenshot below:
To this:

The only difference is enabling the dev-icons plugin. The only custom code I have for this plugin is to call
at some point to fix the bug where sourcing the config file breaks the icons.
The above screenshots come from just running
:Denite buffer