diff options
| author | Luke Kershaw <35707277+l-kershaw@users.noreply.github.com> | 2021-08-03 10:08:42 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-03 11:08:42 +0200 |
| commit | f8caad1d6bd19dbd79945850342b49df41928525 (patch) | |
| tree | f19a51563854b37d30afde7f61b0e3887ca89f4a | |
| parent | 5ff6f9ad070abccf57dda1011c517d14229bafbf (diff) | |
fix: fix `file_browser` on windows and potentially other file opens (#1026)
| -rw-r--r-- | doc/telescope.txt | 8 | ||||
| -rw-r--r-- | lua/telescope/actions/set.lua | 2 | ||||
| -rw-r--r-- | lua/telescope/builtin/init.lua | 1 |
3 files changed, 7 insertions, 4 deletions
diff --git a/doc/telescope.txt b/doc/telescope.txt index 1cf5c91..c2f62fa 100644 --- a/doc/telescope.txt +++ b/doc/telescope.txt @@ -394,9 +394,11 @@ builtin.file_browser({opts}) *builtin.file_browser()* {opts} (table) options to pass to the picker Fields: ~ - {cwd} (string) directory path to browse (default is cwd) - {depth} (number) file tree depth to display (default is 1) - {dir_icon} (string) change the icon for a directory. default: + {cwd} (string) directory path to browse (default is cwd) + {depth} (number) file tree depth to display (default is 1) + {dir_icon} (string) change the icon for a directory. default: + {hidden} (boolean) determines whether to show hidden files or not + (default is false) builtin.treesitter() *builtin.treesitter()* diff --git a/lua/telescope/actions/set.lua b/lua/telescope/actions/set.lua index e246fd7..dc04040 100644 --- a/lua/telescope/actions/set.lua +++ b/lua/telescope/actions/set.lua @@ -94,7 +94,7 @@ action_set.edit = function(prompt_bufnr, command) local filename, row, col - if entry.filename then + if entry.path or entry.filename then filename = entry.path or entry.filename -- TODO: Check for off-by-one diff --git a/lua/telescope/builtin/init.lua b/lua/telescope/builtin/init.lua index 163a258..25d59fb 100644 --- a/lua/telescope/builtin/init.lua +++ b/lua/telescope/builtin/init.lua @@ -103,6 +103,7 @@ builtin.fd = builtin.find_files ---@field cwd string: directory path to browse (default is cwd) ---@field depth number: file tree depth to display (default is 1) ---@field dir_icon string: change the icon for a directory. default: +---@field hidden boolean: determines whether to show hidden files or not (default is false) builtin.file_browser = require("telescope.builtin.files").file_browser --- Lists function names, variables, and other symbols from treesitter queries |
