瀏覽代碼

nixpkgs/neovim: adjust path display in telescope

Thomas Dy 3 月之前
父節點
當前提交
99a96e3797
共有 1 個文件被更改,包括 9 次插入0 次删除
  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,