telescope.nvim icon indicating copy to clipboard operation
telescope.nvim copied to clipboard

feat(path_display): move lnum/col next to filename for `filename_first`

Open jamestrew opened this issue 1 year ago • 1 comments

Combines transform_devicons, transform_path and the string formatting of line and column numbers when available as create_path_display.

This offers a few benefits:

  • allows moving the lnum/col values to be next to the filename rather than and the end of the rest of the path when using path_display = { 'filename_first' }. Closes https://github.com/nvim-telescope/telescope.nvim/issues/3156
  • simplifies the merging of styles when devicon hl groups are present into one function rather than split across many entry makers
  • consolidates lnum/col values concatenation to one function rather than split across many entry makers so that any entry makers that support lnum/col will automatically support the disable_coordinates option that some support. closes https://github.com/nvim-telescope/telescope.nvim/issues/2607
  • consolidates devicon prepending for the same reasons closes https://github.com/nvim-telescope/telescope.nvim/issues/3086

jamestrew avatar Jul 09 '24 23:07 jamestrew

I've done some testing with some of the common pickers (find_files, live_grep, grep_string, buffers, diagnostics, lsp_[references/definition]). I'm going to keep riding this branch for a bit.

jamestrew avatar Jul 10 '24 18:07 jamestrew

This function is great! Looking forward to the merger. Thanks for your great work!

Daydreamer-riri avatar Dec 13 '24 19:12 Daydreamer-riri

Tried this branch and it looks great. find_files, buffers, old_files, lsp_references, lsp_definitions all works great.

milanglacier avatar Dec 19 '24 02:12 milanglacier