Skip to content

Commit b77b97a

Browse files
committed
fix: clean up diff
1 parent a5c31e3 commit b77b97a

2 files changed

Lines changed: 12 additions & 16 deletions

File tree

README.md

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,25 +30,21 @@ Plug 'nvim-telescope/telescope-file-browser.nvim'
3030

3131
You can configure the `telescope-file-browser` like any other `telescope.nvim` picker. Please see `:h telescope-file-browser.picker` for the full set of options dedicated to the picker. For instance, you of course can map `theme` and [mappings](#remappings) as you are used to from `telescope.nvim`.
3232

33-
The setup below shows the defaults. You do not need to set any of the `file_browser` configuration. `require("telescope").load_extension "file_browser"` suffices for the default setup.
34-
3533
```lua
34+
-- You don't need to set any of these options.
35+
-- IMPORTANT!: this is only a showcase of how you can set default options!
3636
require("telescope").setup {
3737
extensions = {
3838
file_browser = {
39-
theme = "ivy",
40-
mappings = {} -- See mappings section
41-
files = true, -- Start in file_browser mode
42-
hidden = false,
43-
respect_gitignore = false, -- expensive with plenary, true if `fd` found
44-
---@field files boolean: start in file (true) or folder (false) browser (default: true)
45-
---@field add_dirs boolean: whether the file browser shows folders (default: true)
46-
---@field depth number: file tree depth to display, `false` for unlimited depth (default: 1)
47-
---@field dir_icon string: change the icon for a directory (default: )
48-
---@field hidden boolean: determines whether to show hidden files or not (default: false)
49-
---@field respect_gitignore boolean: induces slow-down w/ plenary finder (default: false, true if `fd` available)
50-
---@field browse_files function: custom override for the file browser (default: |fb_finders.browse_files|)
51-
---@field browse_folders function: custom override for the folder browser (default: |fb_finders.browse_folders|)
39+
theme = "ivy",
40+
mappings = {
41+
["i"] = {
42+
-- your custom insert mode mappings
43+
},
44+
["n"] = {
45+
-- your custom normal mode mappings
46+
},
47+
},
5248
},
5349
},
5450
}

lua/telescope/_extensions/file_browser/picker.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ local fb_picker = {}
5252
---@field dir_icon string: change the icon for a directory (default: )
5353
---@field hidden boolean: determines whether to show hidden files or not (default: false)
5454
---@field respect_gitignore boolean: induces slow-down w/ plenary finder (default: false, true if `fd` available)
55-
---@filed types table: table incl. {"file", "directory"}, (default: { "directory" })
55+
---@field types table: table incl. {"file", "directory"}, (default: { "directory" })
5656
---@field browse_files function: custom override for the file browser (default: |fb_finders.browse_files|)
5757
---@field browse_folders function: custom override for the folder browser (default: |fb_finders.browse_folders|)
5858
fb_picker.file_browser = function(opts)

0 commit comments

Comments
 (0)