nvim-telescope / telescope.nvim

Find, Filter, Preview, Pick. All lua, all the time.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Jumplist results list unhelpful due to truncated filename

artfulrobot opened this issue · comments

In the screenshot below you can see that it's impossible to see which filename most of the results are in.

The (is it called the picker window?) picker window shows a /var/www/somethin...| jumplist line from file

image

A couple of ideas:

  1. If the picker window showed L123: /var/www/the/filepath it would be (a) show us the line number -helpful- and (b) the file name with more chance of it fitting. We don't really need to see the matched line so much because we have a massive preview window for that.

  2. Alternatively - this could apply to several pickers - if the preview window also included a space for meta information, e.g. the filename (wrapped if it doesn't fit) as well as the preview, that would enable us to keep the succinct picker window but enable richer information for the highlighted bit.

here's my best ascii art mock up

+--------------------------- Preview ------------------------------+
| /**                                                              |
|  * Some method.                                                  |
|  */                                                              |
|█public█function█x()█{████████████████████████████████████████████|
|   print "hello world\n";                                         |
|   print "how you doing?\n";                                      |
| }                                                                |
+------------------------------------------------------------------+
| Filename: /var/www/myamazingwebsite.com/site/paths/can/be/really |
| long/and/tedious.php                                             |
+------------------------------------------------------------------+
+--------------------------- Results ------------------------------+
|█L23:█/var/www/myamazingwebsite.co...reallylong/and/tedious.php███|
| L12: /var/www/myamazingwebsite.com/index.php                     |
| L1292: /var/www/myamazingwebsite.com/templates/home.tpl.latte    |
+------------------------------------------------------------------+
+--------------------------- Jumplist -----------------------------+
| > x                                                              |
+------------------------------------------------------------------+

I believe this behavior was changed across several pickers including jumplist in this PR #2842

The filepath, line and column number and any relevant text is now basically concatenated together like such
image

This change will be included in our upcoming 0.2 release but until then, this is already available on the master branch.

I hope this helps.

@jamestrew oh great! Thanks!!