nixprime / cpsm

A CtrlP matcher, specialized for paths.
Apache License 2.0
202 stars 19 forks source link

Support highlight for CtrlP with devicons #61

Closed phongnh closed 7 months ago

phongnh commented 7 months ago

Hi,

When I use CtrlP with devicons, cpsm's regex highlight does not work. Tried to add regex to support both cases with and without Devicons at beginging of each line.

Here is my test case:

image
>  zero/nvim/plugins/ctrlp.lua
> zero/nvim/plugins/ctrlp.lua
>  zero/vim/plugins/ctrlp.vim
call matchadd('CtrlPMatch', '\V\C\^> \%\(\.\+\s\+\)\?zero/nvim/plugins/\zsctrlp\ze.lua\$')

I think this will make matching slow down a bit. Please merge it if you think it does make senses, thanks.

nixprime commented 7 months ago

Thanks for the contribution!