From 729b5fc7944c64cdd08fa6f7287cfa5f3ad0e34a Mon Sep 17 00:00:00 2001 From: bigzhu Date: Fri, 30 Aug 2024 15:29:02 +0800 Subject: [PATCH] fix: ensure Telescope preserves original file order --- lua/obsidian/pickers/_telescope.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/obsidian/pickers/_telescope.lua b/lua/obsidian/pickers/_telescope.lua index d1b48a885..cdd207558 100644 --- a/lua/obsidian/pickers/_telescope.lua +++ b/lua/obsidian/pickers/_telescope.lua @@ -138,6 +138,7 @@ TelescopePicker.find_files = function(self, opts) prompt_title = prompt_title, cwd = opts.dir and tostring(opts.dir) or tostring(self.client.dir), find_command = self:_build_find_cmd(), + sorter = require("telescope.sorters").fuzzy_with_index_bias(), attach_mappings = function(_, map) attach_picker_mappings(map, { entry_key = "path",