plugins.nvim-tree.enable
Whether to enable nvim-tree.
Type: boolean
Default:
false
Example:
true
Declared by:
plugins.nvim-tree.package
Which package to use for the nvim-tree plugin.
Type: package
Default:
<derivation vimplugin-nvim-tree.lua-2024-05-14>
Declared by:
plugins.nvim-tree.autoClose
Automatically close
Type: boolean
Default:
false
Declared by:
plugins.nvim-tree.autoReloadOnWrite
Reloads the explorer every time a buffer is written to.
Plugin default: true
Type: null or boolean or raw lua code
Default:
null
Declared by:
plugins.nvim-tree.disableNetrw
Disable netrw
Plugin default: false
Type: null or boolean or raw lua code
Default:
null
Declared by:
plugins.nvim-tree.extraOptions
These attributes will be added to the table parameter for the setup function. Typically, it can override NixVim’s default settings.
Type: attribute set of anything
Default:
{ }
Declared by:
plugins.nvim-tree.hijackCursor
Keeps the cursor on the first letter of the filename when moving in the tree.
Plugin default: false
Type: null or boolean or raw lua code
Default:
null
Declared by:
plugins.nvim-tree.hijackNetrw
Hijack netrw
Plugin default: true
Type: null or boolean or raw lua code
Default:
null
Declared by:
plugins.nvim-tree.hijackUnnamedBufferWhenOpening
Opens in place of the unnamed buffer if it’s empty.
Plugin default: false
Type: null or boolean or raw lua code
Default:
null
Declared by:
plugins.nvim-tree.ignoreBufferOnSetup
Will ignore the buffer, when deciding to open the tree on setup.
Type: boolean
Default:
false
Declared by:
plugins.nvim-tree.ignoreFtOnSetup
List of filetypes that will prevent open_on_setup
to open.
You can use this option if you don’t want the tree to open
in some scenarios (eg using vim startify).
Type: list of string
Default:
[ ]
Declared by:
plugins.nvim-tree.onAttach
Function ran when creating the nvim-tree buffer. This can be used to attach keybindings to the tree buffer. When onAttach is “default”, it will use the older mapping strategy, otherwise it will use the newer one.
Example: { __raw = '' function(bufnr) local api = require(“nvim-tree.api”) vim.keymap.set(“n”, “<C-P>”, function() local node = api.tree.get_node_under_cursor() print(node.absolute_path) end, { buffer = bufnr, noremap = true, silent = true, nowait = true, desc = “print the node’s absolute path” }) end ''; }
Plugin default: default
Type: null or value “default” (singular enum) or raw lua code
Default:
null
Declared by:
plugins.nvim-tree.openOnSetup
Will automatically open the tree when running setup if startup buffer is a directory, is empty or is unnamed. nvim-tree window will be focused.
Type: boolean
Default:
false
Declared by:
plugins.nvim-tree.openOnSetupFile
Will automatically open the tree when running setup if startup buffer is a file. File window will be focused. File will be found if updateFocusedFile is enabled.
Type: boolean
Default:
false
Declared by:
plugins.nvim-tree.preferStartupRoot
Prefer startup root directory when updating root directory of the tree.
Only relevant when updateFocusedFile.updateRoot
is true
Plugin default: false
Type: null or boolean or raw lua code
Default:
null
Declared by:
plugins.nvim-tree.reloadOnBufenter
Automatically reloads the tree on BufEnter
nvim-tree.
Plugin default: false
Type: null or boolean or raw lua code
Default:
null
Declared by:
plugins.nvim-tree.respectBufCwd
Will change cwd of nvim-tree to that of new buffer’s when opening nvim-tree.
Plugin default: false
Type: null or boolean or raw lua code
Default:
null
Declared by:
plugins.nvim-tree.rootDirs
Preferred root directories.
Only relevant when updateFocusedFile.updateRoot
is true
.
Plugin default: []
Type: null or (list of string)
Default:
null
Declared by:
plugins.nvim-tree.selectPrompts
Use |vim.ui.select| style prompts. Necessary when using a UI prompt decorator such as dressing.nvim or telescope-ui-select.nvim.
Plugin default: false
Type: null or boolean or raw lua code
Default:
null
Declared by:
plugins.nvim-tree.sortBy
Changes how files within the same directory are sorted.
Can be one of name
, case_sensitive
, modification_time
, extension
or a
function.
Type: string
| function(nodes)
, Default: "name"
Function is passed a table of nodes to be sorted, each node containing:
absolute_path
:string
executable
:boolean
extension
:string
link_to
:string
name
:string
type
:"directory"
|"file"
|"link"
Example: sort by name length: sortBy = { __raw = '' local sort_by = function(nodes) table.sort(nodes, function(a, b) return #a.name < #b.name end) end ''; };
Plugin default: name
Type: null or one of “name”, “case_sensitive”, “modification_time”, “extension” or raw lua code
Default:
null
Declared by:
plugins.nvim-tree.syncRootWithCwd
Changes the tree root directory on DirChanged
and refreshes the tree.
Plugin default: false
Type: null or boolean or raw lua code
Default:
null
Declared by: