mirror of
https://github.com/zoriya/telescope.nvim.git
synced 2026-06-04 19:45:41 +00:00
feat: Support Line Column in file pickers
Original issue: When selecting files in telescope iti is impossible to enter paths from compiler that includes cursor locations, you need to clear it from the path. This commit fixes the problem by stripping out the location from path (important: only for file pickes) and using this location to set the cursor when openning the file and highlight the line or poisition in the previewer. This feature requires a new option for a picker, whichi for now is basically enabling location stripping but it is helpful for any file picker builtin or external one. By default equals `false` becuase most of pickers like live grep, current buffer fuzy are messed up with locations stripping. It is only useful for file searches. Added test suite that covers alghoritm of stripping the location to the `utils_spec.lua`
This commit is contained in:
@@ -384,6 +384,7 @@ files.find_files = function(opts)
|
||||
pickers
|
||||
.new(opts, {
|
||||
prompt_title = "Find Files",
|
||||
files_picker = true,
|
||||
finder = finders.new_oneshot_job(find_command, opts),
|
||||
previewer = conf.file_previewer(opts),
|
||||
sorter = conf.file_sorter(opts),
|
||||
|
||||
Reference in New Issue
Block a user