plugins/neo-tree: better description for a few options (#250)

This commit is contained in:
Gaétan Lepage 2023-03-14 15:22:19 +01:00 committed by GitHub
parent 883703328d
commit 4d4f4d17f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -155,30 +155,38 @@ in {
helpers.defaultNullOpts.mkBool false helpers.defaultNullOpts.mkBool false
"toggle to show selector on statusline"; "toggle to show selector on statusline";
showScrolledOffParentNode = showScrolledOffParentNode = helpers.defaultNullOpts.mkBool false ''
helpers.defaultNullOpts.mkBool false If `true`, tabs are replaced with the parent path of the top visible node when
'' scrolled down.
This will replace the tabs with the parent path of the top visible node when scrolled '';
down.
'';
tabLabels = helpers.mkCompositeOption "falls back to sourceName if null" { tabLabels =
filesystem = helpers.defaultNullOpts.mkStr " Files " "tab label for files"; helpers.mkCompositeOption
buffers = helpers.defaultNullOpts.mkStr " Buffers " "tab label for buffers"; ''
gitStatus = helpers.defaultNullOpts.mkStr " Git " "tab label for git status"; Configure the characters shown on each tab.
diagnostics = Keys of the table should match the source names defined in `sources`.
helpers.defaultNullOpts.mkStr " Diagnostics " Value is what is printed inside the tab.
"tab label for diagnostics"; If value is `nil` or not set, the source name is used instead.
}; '' {
filesystem = helpers.defaultNullOpts.mkStr " Files " "tab label for files";
buffers = helpers.defaultNullOpts.mkStr " Buffers " "tab label for buffers";
gitStatus = helpers.defaultNullOpts.mkStr " Git " "tab label for git status";
diagnostics =
helpers.defaultNullOpts.mkStr " Diagnostics "
"tab label for diagnostics";
};
contentLayout = contentLayout =
helpers.defaultNullOpts.mkEnumFirstDefault ["start" "end" "focus"] helpers.defaultNullOpts.mkEnumFirstDefault ["start" "end" "focus"]
'' ''
Only with `tabsLayout` = "equal" or "focus". Defines how the labels are placed inside a tab.
This only takes effect when the tab width is greater than the length of label i.e.
`tabsLayout = "equal", "focus"` or when `tabsMinWidth` is large enough.
- start : |/ bufname \/... Following options are available.
- end : |/ bufname \/... "start" : left aligned / bufname \/..
- center : |/ bufname \/... "end" : right aligned / bufname \/...
"center" : centered with equal padding / bufname \/...
''; '';
tabsLayout = tabsLayout =
@ -186,11 +194,16 @@ in {
["start" "end" "center" "equal" "focus"] ["start" "end" "center" "equal" "focus"]
"equal" "equal"
'' ''
- start : |/ a \/ b \/ c \ | Defines how the tabs are aligned inside the window when there is more than enough
- end : | / a \/ b \/ c \| space.
- center : | / a \/ b \/ c \ | The following options are available.
- equal : |/ a \/ b \/ c \| `active` will expand the focused tab as much as possible. Bars denote the edge of window.
- active : |/ focused tab \/ b \/ c \|
"start" : left aligned / ~ \/ ~ \/ ~ \
"end" : right aligned / ~ \/ ~ \/ ~ \
"center" : centered with equal padding / ~ \/ ~ \/ ~ \
"equal" : expand all tabs equally to fit the window width / ~ \/ ~ \/ ~ \
"active" : expand the focused tab to fit the window width / focused tab \/ ~ \/ ~ \
''; '';
truncationCharacter = truncationCharacter =
@ -210,7 +223,9 @@ in {
(with types; either int (attrsOf int)) (with types; either int (attrsOf int))
"0" "0"
'' ''
Can be int or table"; Defines the global padding of the source selector.
It can be an integer or an attrs with keys `left` and `right`.
Setting `padding = 2` is exactly the same as `{ left = 2; right = 2; }`.
Example: `{ left = 2; right = 0; }` Example: `{ left = 2; right = 0; }`
''; '';
@ -251,8 +266,12 @@ in {
showSeparatorOnEdge = showSeparatorOnEdge =
helpers.defaultNullOpts.mkBool false helpers.defaultNullOpts.mkBool false
'' ''
true : |/ a \/ b \/ c \| Takes a boolean value where `false` (default) hides the separators on the far
false : | a \/ b \/ c | left / right.
Especially useful when left and right separator are the same.
'true' : / ~ \/ ~ \/ ~ \
'false' : ~ \/ ~ \/ ~
''; '';
highlightTab = helpers.defaultNullOpts.mkStr "NeoTreeTabInactive" ""; highlightTab = helpers.defaultNullOpts.mkStr "NeoTreeTabInactive" "";