Sfoglia il codice sorgente

nixpkgs/neovim: adjust path display in telescope

Thomas Dy 3 mesi fa
parent
commit
99a96e3797
1 ha cambiato i file con 9 aggiunte e 0 eliminazioni
  1. 9 0
      .config/nixpkgs/neovim/plugins.lua

+ 9 - 0
.config/nixpkgs/neovim/plugins.lua

@@ -27,6 +27,15 @@ require('telescope').setup({
     -- use filename as preview window title
     dynamic_preview_title = true,
 
+    path_display = {
+      -- shorten directory names of everything but the last 3 parts
+      -- foo/bar/baz/file.txt -> f/boo/bar/file.txt
+      shorten = { len = 1, exclude = { -3, -2, -1 } },
+
+      -- truncate the beginning of the file name if wider than the window
+      truncate = true,
+    },
+
     preview = {
       -- don't preview files larger than 1MB
       filesize_limit = 1,