add a sorter with highlighter to multi-ripgrep
Heya! 🤸🏼♂️
I really enjoyed your Advanced Telescope video, and have been playing along to add the "MultiGrep" to my setup.
I wanted to replace entirely my use of live_grep, but I noticed that the "MultiGrep" was missing highlighting of the match in the picker section.
live_grep uses require("telescope.sorters").highlighter_only(opts) as its sorter, and that did the trick, except when using a filename filtering pattern.
See: https://github.com/nvim-telescope/telescope.nvim/blob/master/lua/telescope/builtin/__files.lua
So I copied the code from highlighter_only and adapted it to work with a split prompt.
See: https://github.com/nvim-telescope/telescope.nvim/blob/master/lua/telescope/sorters.lua
Before:
After:
I hope you find this useful, keep up the great work!
Étienne
Video: https://www.youtube.com/watch?v=xdXE1tOT-qg