1
Files
flake-nixinator/config/neovim/store/lazy-plugins/chadtree/docs/CONFIGURATION.md

5.2 KiB

Configurations

All configurations are under the global variable chadtree_settings.

VimL:

let g:chadtree_settings = { ... }

Lua:

local chadtree_settings = { ... }
vim.api.nvim_set_var("chadtree_settings", chadtree_settings)

Shorthand

Dictionary keys will be automatically expanded with the . notation. This works recursively.

ie. The following are equivalent

{ "dog.puppy": 2 }
{ "dog": { "puppy": 2 } }

Note in lua, you will need to quote your keys like so:

{ ["dog.puppy"] = 2 }

Note in VimL, to specify True and False, you need to use the following:

v:true
v:false

Validation

Variables will be validated against a schema.

ie.

let g:chadtree_settings = { 'ignore.dog': 'scratch, stratch' }

Will give you the following error message:

schema error.png

Notice it says Extra keys: {dog}


Specifics

The default configuration can be found under an yaml file


chadtree_settings.xdg

Use XDG specifications for storing the CHADTree runtime and session files.

If set to false, will store everything under repo location.

default:

false

chadtree_settings.keymap

See help docs on keybind


chadtree_settings.options

chadtree_settings.options.follow

CHADTree will highlight currently open file, and open all its parents.

default:

true

CHADTree will follow symlinks

default:

true

chadtree_settings.options.lang

CHADTree will guess your locale from unix environmental variables.

Set to c to disable emojis.

default:

null

note:

I only wrote localization for en. zh will be coming, and maybe fr if I can get my girlfriend to help.

chadtree_settings.options.mimetypes

CHADTree will attempt to warn you when you try to open say an image. This is done via the Internet Assigned Numbers Authority's mimetype database.

chadtree_settings.options.mimetypes.warn

Show a warning before opening these datatypes

default:

["audio", "font", "image", "video"]
chadtree_settings.options.mimetypes.allow_exts

Skip warning for these extensions

default:

[".ts"]

chadtree_settings.options.page_increment

Change how many lines { and } scroll

default:

5

chadtree_settings.options.min_diagnostics_severity

Lower is more severe.

default:

2

chadtree_settings.options.polling_rate

CHADTree's background refresh rate

default:

2.0

chadtree_settings.options.session

Save & restore currently open folders

default:

true

chadtree_settings.options.show_hidden

Hide some files and folders by default. By default this can be toggled using the . key.

see chadtree_settings.ignore for more details

default:

false

chadtree_settings.options.version_control

chadtree_settings.options.version_control.enable

Enable version control. This can also be toggled. But unlike show_hidden, does not have a default keybind.

default:

true

chadtree_settings.ignore

CHADTree can ignore showing some files. This is toggable by default using the . key.

chadtree_settings.ignore.name_exact

Files whose name match these exactly will be ignored.

default:

[".DS_Store", ".directory", "thumbs.db", ".git"]

chadtree_settings.ignore.name_glob

Files whose name match these glob patterns will be ignored.

ie. *.py will match all python files

default:

[]

chadtree_settings.ignore.path_glob

Files whose full path match these glob patterns will be ignored.

default:

[]

chadtree_settings.view

Some options to change CHADTree's appearance

chadtree_settings.view.open_direction

Which way does CHADTree open?

legal keys: one of

["left", "right"]

default:

"left"

chadtree_settings.view.sort_by

CHADTree can sort by the following criterion. Reorder them if you want a different sorting order.

legal keys: some of

["is_folder", "ext", "file_name_lower", "file_name"]

default:

["is_folder", "ext", "file_name_lower", "file_name"]

chadtree_settings.view.width

How big is CHADTree when initially opened?

default:

40

chadtree_settings.view.window_options

Set of window local options to for CHADTree windows

default:

{
  "cursorline": true,
  "number": false,
  "relativenumber": false,
  "signcolumn": "no",
  "winfixwidth": true,
  "wrap": false
}

chadtree_settings.theme

See help docs on themes