Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/weirongxu/coc-explorer
📁 Explorer for coc.nvim
https://github.com/weirongxu/coc-explorer
coc coc-nvim explorer file neovim tree vim
Last synced: 4 days ago
JSON representation
📁 Explorer for coc.nvim
- Host: GitHub
- URL: https://github.com/weirongxu/coc-explorer
- Owner: weirongxu
- License: mit
- Created: 2019-09-02T14:54:07.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-09-24T01:44:10.000Z (3 months ago)
- Last Synced: 2024-12-11T17:04:36.008Z (11 days ago)
- Topics: coc, coc-nvim, explorer, file, neovim, tree, vim
- Language: TypeScript
- Homepage:
- Size: 3.1 MB
- Stars: 1,147
- Watchers: 8
- Forks: 45
- Open Issues: 71
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
- awesome-list - coc-explorer
README
# coc-explorer
Explorer extension for [coc.nvim](https://github.com/neoclide/coc.nvim)
**Note: This project is still under development and may be broken.**
[![Build Status](https://img.shields.io/github/actions/workflow/status/weirongxu/coc-explorer/ci.yml?branch=master)](https://github.com/weirongxu/coc-explorer/actions)
## Screenshot
![image](https://user-images.githubusercontent.com/1709861/76720263-471be100-6777-11ea-82c1-614627097b02.png)
## Requirements
`>= vim 8.1.1418` or `>= neovim 0.3.1`
## Usage
1. Install by coc.nvim command:
```
:CocInstall coc-explorer
```
2. Configuration custom vim mapping
```
:nmap e CocCommand explorer
```
3. Open explorer
```
e
```
4. Press `?` to show mappings helpMore at [Quickstart](https://github.com/weirongxu/coc-explorer/wiki/Quickstart)
## Feature
- [x] Buffer source
- [x] Highlight visible buffers in real time
- [x] File tree source
- [x] Basic actions
- [x] Open file in select / vsplit / tab
`explorer.openAction.strategy` options:
- select: Open action use selection UI
- vsplit: Open action use vsplit
- split: Open action use split
- tab: Open action use tab
- previousBuffer: Open action use last used buffer
- previousWindow: Open action use last used window
- sourceWindow: Open action use the window where explorer opened
- [x] Selection
- [x] Cut / Copy / Paste
- [x] Delete action use trash by default
- [x] Other actions, press `?` in explorer to check out the all actions
- [x] Git status
- [x] Automatically reveal the current file
- [x] Icons, use [nerdfont](https://github.com/ryanoasis/nerd-fonts)
- [x] Search files by Coc-list
- [x] Preview file attributes by floating window
- [ ] LSP
- [x] diagnostic
- [ ] file rename (won't support, use [watchman](https://github.com/neoclide/coc.nvim/wiki/Install-coc.nvim#install-watchman-for-file-watching))
- [ ] Exrename, like [defx](https://github.com/Shougo/defx.nvim)
- [ ] Archive file (use `lsar / unar`)
- [ ] SSH
- [x] ~~Bookmark source (DEPRECATED) (require [coc-bookmark](https://github.com/voldikss/coc-bookmark))~~
- [ ] Git source
- [ ] Git actions
- [x] Show help## Command
```
:CocCommand explorer [options] [root-uri]
```### User events
- `CocExplorerOpenPre`: triggered before open explorer
- `CocExplorerOpenPost`: triggered after open explorer
- `CocExplorerQuitPre`: triggered before quit explorer
- `CocExplorerQuitPost`: triggered after quit explorer### Example
```vim
:CocCommand explorer
\ --toggle
\ --sources=buffer+,file+
\ /root/path
```Reveal to current buffer for closest coc-explorer
```vim
nmap er call CocAction('runCommand', 'explorer.doAction', 'closest', ['reveal:0'], [['relative', 0, 'file']])
```### Presets
```vim
let g:coc_explorer_global_presets = {
\ '.vim': {
\ 'root-uri': '~/.vim',
\ },
\ 'cocConfig': {
\ 'root-uri': '~/.config/coc',
\ },
\ 'tab': {
\ 'position': 'tab',
\ 'quit-on-open': v:true,
\ },
\ 'tab:$': {
\ 'position': 'tab:$',
\ 'quit-on-open': v:true,
\ },
\ 'floating': {
\ 'position': 'floating',
\ 'open-action-strategy': 'sourceWindow',
\ },
\ 'floatingTop': {
\ 'position': 'floating',
\ 'floating-position': 'center-top',
\ 'open-action-strategy': 'sourceWindow',
\ },
\ 'floatingLeftside': {
\ 'position': 'floating',
\ 'floating-position': 'left-center',
\ 'floating-width': 50,
\ 'open-action-strategy': 'sourceWindow',
\ },
\ 'floatingRightside': {
\ 'position': 'floating',
\ 'floating-position': 'right-center',
\ 'floating-width': 50,
\ 'open-action-strategy': 'sourceWindow',
\ },
\ 'simplify': {
\ 'file-child-template': '[selection | clip | 1] [indent][icon | 1] [filename omitCenter 1]'
\ },
\ 'buffer': {
\ 'sources': [{'name': 'buffer', 'expand': v:true}]
\ },
\ }" Use preset argument to open it
nmap ed CocCommand explorer --preset .vim
nmap ef CocCommand explorer --preset floating
nmap ec CocCommand explorer --preset cocConfig
nmap eb CocCommand explorer --preset buffer" List all presets
nmap el CocList explPresets
```### Options
#### `[root-uri]`
Explorer root, default is use `root-strategies`
#### `--root-strategies `
Strategies for root uri, types `list of (keep | workspace | cwd | sourceBuffer | reveal | custom:name)`
- `keep`: never change the root path
- `workspace`: `workspace.root`
- `cwd`: `getcwd()`
- `sourceBuffer`: directory of buffer
- `reveal`: directory of reveal pathdefault is: `workspace,cwd,sourceBuffer,reveal` or `"explorer.root.strategies" of coc-settings`
**Custom root patterns settings**
```jsonc
{
"explorer.root.customRules": {
"vcs": {
"patterns": [".git", ".hg", ".projections.json"],
},
"vcs-r": {
"patterns": [".git", ".hg", ".projections.json"],
"bottomUp": true,
},
},
}
```**Using custom root patterns**
```jsonc
{
"explorer.root.strategies": ["workspace", "custom:vcs", "custom:vcs-r"],
}
```or `:CocCommand explorer --root-strategies workspace,custom:vcs,custom:vcs-r`
#### `--preset `
Open explorer use presets
#### `--toggle | --no-toggle`
Close the explorer if it exists, default: `--toggle`
#### `--focus | --no-focus`
Focus to explorer when opened, default: `--focus`
#### `--open-action-strategy `
Strategy for open action, types: `select | vsplit | split | tab | previousBuffer | previousWindow | sourceWindow`, default: `select`
#### `--quit-on-open | --no-quit-on-open`
quit explorer when open action, default: `--no-quit-on-open`
#### `--sources `
Explorer sources, example: `buffer+,file+`, default: `buffer-,file+`
```
expand
collapsed │
↓ ↓
buffer-,file+
└──┬─┘ └─┬┘
buffer source │
file source
```#### `--position `
Explorer position, supported position: `left`, `right`, `tab`, `tab:0`, `tab:$`, `floating`, default: `left`
#### `--width `
Width of Explorer window for open in left or right side, default: `40`
#### `--content-width `
Content width, default: `0`
#### `--content-width-type `
Type of content width, types: `win-width`, `vim-width`, , default: `vim-width`
#### `--floating-position `
Explorer position for floating window, positions:
- `left-center`
- `center`
- `right-center`
- `center-top`
- `,`default: `center`
#### `--floating-width `
Width of Explorer window when position is floating, use negative value or zero to as `width - value`, default: `0`
#### `--floating-height `
Height of Explorer window when position is floating, use negative value or zero to as `height - value`, default: `0`
#### `--floating-content-width `
Width of content when position is floating, use negative value or zero to as `width - value`, default: `0`
#### `--buffer-root-template `
Template for root node of buffer source
Columns:
- icon
- hidden
- titledefault: `[icon] [title] [hidden & 1]`
#### `--buffer-child-template `
Template for child node of buffer source
Columns:
- selection
- name
- bufname
- modified
- bufnr
- readonly
- fullpath
- relativePathdefault: `[selection | 1] [bufnr] [name][modified][readonly] [fullpath]`
#### `--buffer-child-labeling-template `
Labeling template for child node of buffer source, use for preview when previewAction is labeling
Columns: same with `--buffer-child-template`
default: `[name][bufname][fullpath][modified][readonly]`
#### `--file-root-template `
Template for root node of file source
Columns:
- icon
- hidden
- title
- root
- fullpathdefault: `[icon] [title] [hidden & 1][root] [fullpath]`
#### `--file-root-labeling-template `
Labeling template for root node of file source, use for preview when previewAction is labeling
Columns: same with `--file-root-template`
default: `[fullpath]`
#### `--file-child-template `
Template for child node file source
Columns:
- git
- selection
- icon
- filename
- linkIcon
- link
- fullpath
- indent
- clip
- size
- readonly
- modified
- timeModified
- timeCreated
- timeAccessed
- diagnosticError
- diagnosticWarningdefault: `[git | 2] [selection | clip | 1] [indent][icon | 1] [diagnosticError & 1][filename omitCenter 1][modified][readonly] [linkIcon & 1][link growRight 1 omitCenter 5][size]`
#### `--file-child-labeling-template `
Labeling template for child node of file source, use for preview when previewAction is labeling
Columns: same with `--file-child-template`
default: `[fullpath][link][diagnosticWarning][diagnosticError][size][timeAccessed][timeModified][timeCreated][readonly][modified]`
#### `--bookmark-root-template `
Template for root node of bookmark source
Columns:
- icon
- hidden
- titledefault: `[icon] [title] [hidden & 1]`
#### `--bookmark-child-template `
Template for child node of bookmark source
Columns:
- selection
- position
- filename
- fullpath
- line
- annotationdefault: `[selection | 1] [filename] [position]`
#### `--bookmark-child-labeling-template `
Labeling template for child node of bookmark source, use for preview when previewAction is labeling
Columns: same with `--bookmark-child-template`
default: `[filename][fullpath][position][line][annotation]`
#### `--reveal `
Explorer will expand to this filepath, default: `current buffer`
#### `--reveal-when-open | --no-reveal-when-open`
Explorer will automatically reveal to the current buffer when open explorer, default: `"explorer.file.reveal.whenOpen"`
## Template grammar
**Example:**
```
[git | 2] [selection | clip | 1] [diagnosticError & 1][filename growRight 1 omitCenter 5]
```- `[git]`
- Display `git`.
- `[git | 2]`
- If `git` is not empty, display `git`, otherwise display `2 spaces`.
- `[selection | clip | 1]`
- Checking `selection` and `clip` in turn, if one is not empty, display it, otherwise display `1 spaces`.
- `[diagnosticError & 1]`
- If `diagnosticError` is empty, display nothing. otherwise display `diagnosticError` and `1 space`.
- `[filename growRight 1 omitCenter 5]`
- Flexible to display `filename`, grow right column volume is 1, omit center volume is 5**Grammar:**
```
block
┌──────────────┴───────────────┐
┌────────┴───────────┐ ┌────────────────┴────────────────┐
[selection | clip | 1] [filename growRight 1 omitCenter 5]
↑
plain stringcolumn
┌─────────┴───────────┐
│ │ volume of modifier
│ ┌────┬──────│──────────┴────┬────────────┐
┌───┴───┐ ┌─┴┐ ↓ ┌──┴───┐ ↓ ↓
[selection | clip | 1] [filename growRight 1 omitCenter 5]
↑ ↑ └───┬───┘ └────┬───┘
└──────┴───────────┬──────┴────────────┘
modifier
```## Custom mappings example
You can use `?` to view all actions of current source
```jsonc
// coc-settings.json
{
"explorer.keyMappings.global": {
"i": false, // cancel default mapkey
"": "noop","*": "toggleSelection",
"": "actionMenu","gk": ["wait", "expandablePrev"],
"gj": ["wait", "expandableNext"],
"h": ["wait", "collapse"],
"l": ["wait", "expandable?", "expand", "open"],
"J": ["wait", "toggleSelection", "normal:j"],
"K": ["wait", "toggleSelection", "normal:k"],
"gl": ["wait", "expand:recursive"],
"gh": ["wait", "collapse:recursive"],
"<2-LeftMouse>": [
"expandable?",
["expanded?", "collapse", "expand"],
"open",
],
"o": ["wait", "expanded?", "collapse", "expand"],
"": ["wait", "expandable?", "cd", "open"],
"e": "open",
"s": "open:split",
"E": "open:vsplit",
"t": "open:tab",
"": ["wait", "gotoParent"],
"gs": ["wait", "reveal:select"],
"il": "preview:labeling",
"ic": "preview:content",
"Il": "previewOnHover:toggle:labeling",
"Ic": "previewOnHover:toggle:content",
"II": "previewOnHover:disable","yp": "copyFilepath",
"yn": "copyFilename",
"yy": "copyFile",
"dd": "cutFile",
"p": "pasteFile",
"df": "delete",
"dF": "deleteForever","a": "addFile",
"A": "addDirectory",
"r": "rename","zh": "toggleHidden",
"g": "toggleHidden",
"R": "refresh","?": "help",
"q": "quit",
"": "esc",
"X": "systemExecute",
"gd": "listDrive","f": "search",
"F": "searchRecursive","gf": "gotoSource:file",
"gb": "gotoSource:buffer","[[": ["wait", "sourcePrev"],
"]]": ["wait", "sourceNext"],"[i": ["wait", "indentPrev"],
"]i": ["wait", "indentNext"],"[m": ["wait", "markPrev:modified"],
"]m": ["wait", "markNext:modified"],"[d": ["wait", "markPrev:diagnosticError:diagnosticWarning"],
"]d": ["wait", "markNext:diagnosticError:diagnosticWarning"],
"[D": ["wait", "markPrev:diagnosticError"],
"]D": ["wait", "markNext:diagnosticError"],"[c": ["wait", "markPrev:git"],
"]c": ["wait", "markNext:git"],
"<<": "gitStage",
">>": "gitUnstage",
},
}
```## WIKI
- https://github.com/weirongxu/coc-explorer/wiki
## FAQ
- https://github.com/weirongxu/coc-explorer/wiki/FAQ
- https://github.com/weirongxu/coc-explorer/issues?q=is%3Aissue+sort%3Aupdated-desc+label%3Aquestion## Example by Vim API and event hooks
```vim
function! s:explorer_cur_dir()
let node_info = CocAction('runCommand', 'explorer.getNodeInfo', 0)
return fnamemodify(node_info['fullpath'], ':h')
endfunctionfunction! s:exec_cur_dir(cmd)
let dir = s:explorer_cur_dir()
execute 'cd ' . dir
execute a:cmd
endfunctionfunction! s:init_explorer()
set winblend=10" Integration with other plugins
" CocList
nmap fg call exec_cur_dir('CocList -I grep')
nmap fG call exec_cur_dir('CocList -I grep -regex')
nmap call exec_cur_dir('CocList files')" vim-floaterm
nmap ft call exec_cur_dir('FloatermNew --wintype=floating')
endfunctionfunction! s:enter_explorer()
if &filetype == 'coc-explorer'
" statusline
setl statusline=coc-explorer
endif
endfunctionaugroup CocExplorerCustom
autocmd!
autocmd BufEnter * call enter_explorer()
autocmd FileType coc-explorer call init_explorer()
augroup END
```more API: https://github.com/weirongxu/coc-explorer/wiki/Vim-API
## Settings
### Commands
explorer
: Open explorer.### Configuration
Definitions
Explorer1
: Explorer1.
Type:{
/**
* Explorer source name
*/
name: 'bookmark' | 'buffer' | 'file';
/**
* Whether to expand it by default
*/
expand: boolean;
[k: string]: unknown | undefined;
}[]
Position
: Position.
Type:'left' | 'right' | 'tab' | 'floating'
MappingActionExp
: MappingActionExp.
Type:MappingAction | MappingActionExp[]
MappingAction
: MappingAction.
Type:string | {
name?: string;
args?: string[];
[k: string]: unknown | undefined;
}
PreviewActionStrategy
: PreviewActionStrategy.
Type:'labeling' | 'content'
RootStrategy
: RootStrategy.
Type:'keep' | 'workspace' | 'cwd' | 'sourceBuffer' | 'reveal'
Properties
explorer.presets
: Explorer presets.
Type:Default:{
[k: string]: {
'root-uri'?: string;
/**
* Close the explorer if it exists
*/
toggle?: boolean;
/**
* Focus to explorer when opened
*/
focus?: boolean;
/**
* Strategy for open action
*/
'open-action-strategy'?: 'select' | 'split' | 'split.plain' | 'split.intelligent' | 'vsplit' | 'vsplit.plain' | 'vsplit.intelligent' | 'tab' | 'drop.select' | 'drop.tab' | 'previousBuffer' | 'previousWindow' | 'sourceWindow';
/**
* quit explorer when open action
*/
'quit-on-open'?: boolean;
reveal?: string;
sources?: Explorer1;
/**
* Explorer position
*/
position?: Position | [
Position
] | [
Position,
string
];
/**
* Width of explorer window for open in left or right side
*/
width?: number;
/**
* Content width, use negative value or zero to as `width - value`
*/
'content-width'?: number;
/**
* Type of content width
*/
'content-width-type'?: 'win-width' | 'vim-width';
/**
* Position of Explorer for floating window
*/
'floating-position'?: ('left-center' | 'right-center' | 'center' | 'center-top') | [
number,
number
];
/**
* Width of explorer window when position is floating, use negative value or zero to as `width - value`
*/
'floating-width'?: number;
/**
* Height of explorer window when position is floating, use negative value or zero to as `height - value`
*/
'floating-height'?: number;
/**
* Width of content when position is floating, use negative value or zero to as `width - value`
*/
'floating-content-width'?: number;
/**
* Template for root node of buffer source
*/
'buffer-root-template'?: string;
/**
* Template for child node of buffer source
*/
'buffer-child-template'?: string;
/**
* Labeling template for child node of buffer source, use for preview when previewAction is labeling
*/
'buffer-child-labeling-template'?: string;
/**
* Template for root node of file source
*/
'file-root-template'?: string;
/**
* Labeling template for root node of file source, use for preview when previewAction is labeling
*/
'file-root-labeling-template'?: string;
/**
* Template for child node file source
*/
'file-child-template'?: string;
/**
* Labeling template for child node of file source, use for preview when previewAction is labeling
*/
'file-child-labeling-template'?: string;
[k: string]: unknown | undefined;
} | undefined;
}null
explorer.mouseMode
: Mouse mode.
Type:Default:'none' | 'singleclick' | 'doubleclick'
"doubleclick"
explorer.keyMappingMode
: Keymapping mode.
Type:Default:'none' | 'default'
"default"
explorer.keyMappings.global
: .
Type:Default:Mapping
{}
explorer.keyMappings.vmap
: .
Type:Default:Mapping1
{}
explorer.keyMappings.sources
: Custom key mappings in source.
Type:Default:{
[k: string]: Mapping2 | undefined;
}{}
explorer.toggle
: Close the explorer if it exists.
Type:Default:boolean
true
explorer.focus
: Focus to explorer when opened.
Type:Default:boolean
true
explorer.position
: Explorer position.
Type:Default:Position | [
Position
] | [
Position,
string
]"left"
explorer.width
: Width of explorer window for open in left or right side.
Type:Default:number
40
explorer.contentWidth
: Content width, use negative value or zero to as `width - value`.
Type:Default:number
0
explorer.contentWidthType
: Type of content width.
Type:Default:'win-width' | 'vim-width'
"vim-width"
explorer.floating.position
: Position of Explorer for floating window.
Type:Default:('left-center' | 'right-center' | 'center' | 'center-top') | [
number,
number
]"center"
explorer.floating.width
: Width of explorer window when position is floating, use negative value or zero to as `width - value`.
Type:Default:number
-10
explorer.floating.height
: Height of explorer window when position is floating, use negative value or zero to as `height - value`.
Type:Default:number
-10
explorer.floating.contentWidth
: Width of content when position is floating, use negative value or zero to as `width - value`.
Type:Default:number
0
explorer.floating.border.enable
: .
Type:Default:boolean
true
explorer.floating.border.chars
: Border chars for floating window, their order is top/right/bottom/left/topleft/topright/botright/botleft.
Type:Default:string[]
[
"─",
"│",
"─",
"│",
"┌",
"┐",
"┘",
"└"
]
explorer.floating.border.title
: .
Type:Default:string
"coc-explorer"
explorer.floating.hideOnCocList
: Hide floating window, when opening CocList.
Type:Default:boolean
true
explorer.autoExpandMaxDepth
: Automatically expand maximum depth of one time.
Type:Default:number
20
explorer.autoExpandOptions
: Automatically expand options.
Type:Default:('recursive' | 'compact' | 'uncompact' | 'recursiveSingle')[]
[
"compact",
"uncompact"
]
explorer.autoCollapseOptions
: Automatically collapse options.
Type:Default:'recursive'[]
[
"recursive"
]
explorer.quitOnOpen
: quit explorer when open action.
Type:Default:boolean
false
explorer.previewAction.onHover
: Open preview when hovering over on node.
Type:Default:false | PreviewActionStrategy | [
PreviewActionStrategy,
number
]false
explorer.previewAction.content.maxHeight
: Preview content maximum height.
Type:Default:number
30
explorer.openAction.strategy
: Strategy for open action.
Type:Default:'select' | 'split' | 'split.plain' | 'split.intelligent' | 'vsplit' | 'vsplit.plain' | 'vsplit.intelligent' | 'tab' | 'drop.select' | 'drop.tab' | 'previousBuffer' | 'previousWindow' | 'sourceWindow'
"select"
explorer.openAction.select.filter
: Filter windows for select strategy.
Type:Default:BufferFilter & {
/**
* Filter windows for select strategy in source
*/
sources?: {
[k: string]: BufferFilter;
};
[k: string]: unknown | undefined;
}{
"buftypes": [
"terminal"
],
"filetypes": [
"vista",
"vista_kind",
"qf",
"tagbar",
"coctree"
],
"floatingWindows": true,
"sources": {
"buffer": {
"buftypes": []
}
}
}
explorer.openAction.select.chars
: Chars for select strategy.
Type:Default:string
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
explorer.openAction.for.directory
: The action when you open a directory of file source.
Type:Default:MappingAction | MappingActionExp[]
"cd"
explorer.openAction.relativePath
: Use relative path when open a file with openAction.
Type:Default:boolean
false
explorer.expandStores
: The expand stores of sources.
Type:Default:boolean | {
includes: string[];
} | {
excludes: string[];
}true
explorer.sources
: .
Type:Default:Explorer1
[
{
"name": "bookmark",
"expand": false
},
{
"name": "buffer",
"expand": false
},
{
"name": "file",
"expand": true
}
]
explorer.root.strategies
: Strategies for root uri.
Type:Default:(RootStrategy | string)[]
[
"workspace",
"cwd",
"sourceBuffer",
"reveal"
]
explorer.root.customRules
: Patterns for root uri.
Type:Default:{
[k: string]: {
patterns: string[];
/**
* Search outward from the current buffer, default is false
*/
bottomUp?: boolean;
[k: string]: unknown | undefined;
} | undefined;
}null
explorer.enableFloatinput
: Enable integrated with coc-floatinput.
Type:Default:boolean
true
explorer.icon.enableNerdfont
: Enable nerdfont.
Type:Default:boolean
false
explorer.icon.source
: The source or file type icon and color.
Type:Default:'builtin' | 'vim-devicons' | 'nvim-web-devicons' | 'nerdfont.vim'
"builtin"
explorer.icon.customIcons
: Custom icons and color highlights.
Type:Default:{
/**
* Icons for extension groups
*/
icons?: {
/**
* Icon for an extension group
*/
[k: string]: {
/**
* Group icon
*/
code: string;
/**
* Group icon color
*/
color: string;
[k: string]: unknown | undefined;
} | undefined;
};
/**
* File extension to icon group
*/
extensions?: {
[k: string]: unknown | undefined;
};
/**
* Filename to icon group
*/
filenames?: {
[k: string]: unknown | undefined;
};
/**
* Filename to icon group
*/
dirnames?: {
[k: string]: unknown | undefined;
};
/**
* Pattern to icon group
*/
patternMatches?: {
[k: string]: unknown | undefined;
};
/**
* Pattern to icon group
*/
dirPatternMatches?: {
[k: string]: unknown | undefined;
};
[k: string]: unknown | undefined;
}{
"icons": {},
"extensions": {},
"filenames": {},
"dirnames": {},
"patternMatches": {},
"dirPatternMatches": {}
}
explorer.icon.expanded
: Icon for expanded node.
Type:Default:string
"-"
explorer.icon.collapsed
: Icon for collapsed node.
Type:Default:string
"+"
explorer.icon.selected
: Selection selected chars for File source.
Type:Default:string
"✓"
explorer.icon.hidden
: Icon for hidden status.
Type:Default:string
"‥"
explorer.icon.link
: Icon for soft link.
Type:Default:string
"→"
explorer.icon.readonly
: Icon for readonly.
Type:Default:string
"RO"
explorer.bookmark.root.template
: Template for root node of bookmark source.
Type:Default:string
"[icon] [title] [hidden & 1]"
explorer.bookmark.child.template
: Template for child node of bookmark source.
Type:Default:string
"[selection | 1] [filename] [position] - [annotation]"
explorer.bookmark.child.labelingTemplate
: Labeling template for child node of bookmark source, use for preview when previewAction is labeling.
Type:Default:string
"[filename][fullpath][position][line][annotation]"
explorer.buffer.showHiddenBuffers
: Default show hidden buffers.
Type:Default:boolean
false
explorer.buffer.tabOnly
: Default only show buffers in current tab.
Type:Default:boolean
false
explorer.buffer.root.template
: Template for root node of buffer source.
Type:Default:string
"[icon] [title] [hidden & 1]"
explorer.buffer.child.template
: Template for child node of buffer source.
Type:Default:string
"[git | 2] [selection | 1] [bufnr] [name][modified][readonly] [relativePath]"
explorer.buffer.child.labelingTemplate
: Labeling template for child node of buffer source, use for preview when previewAction is labeling.
Type:Default:string
"[name][bufname][fullpath][modified][readonly][diagnosticError][diagnosticWarning][git]"
explorer.datetime.format
: Explorer datetime format, check out https://date-fns.org/v2.9.0/docs/format.
Type:Default:string
"yy/MM/dd HH:mm:ss"
explorer.file.reveal.whenOpen
: Explorer will automatically reveal to the current buffer when open explorer.
Type:Default:boolean
true
explorer.file.reveal.auto
: Explorer will automatically reveal to the current buffer when enter a buffer.
Type:Default:boolean
false
explorer.file.reveal.filter
: Exlorer will not automatically reveal to these buffers.
Type:Default:{
/**
* Filter buffer by RegExp
*/
patterns?: string[];
/**
* Filter buffer by literal string
*/
literals?: string[];
[k: string]: unknown | undefined;
}{}
explorer.file.hiddenRules
: Custom hidden rules for file.
Type:Default:{
extensions?: string[];
filenames?: string[];
/**
* Pattern to icon group
*/
patternMatches?: unknown[];
[k: string]: unknown | undefined;
}{
"extensions": [
"o",
"a",
"obj",
"pyc"
],
"filenames": [],
"patternMatches": [
"^\\."
]
}
explorer.file.showHiddenFiles
: Default show hidden files.
Type:Default:boolean
false
explorer.file.root.template
: Template for root node of file source.
Type:Default:string
"[icon] [title] [git & 1][hidden & 1][root] [fullpath]"
explorer.file.root.labelingTemplate
: Labeling template for root node of file source, use for preview when previewAction is labeling.
Type:Default:string
"[fullpath][git]"
explorer.file.child.template
: Template for child node file source.
Type:Default:string
"[git | 2] [selection | clip | 1] [indent][icon | 1] [diagnosticError & 1][filename omitCenter 1][modified][readonly] [linkIcon & 1][link growRight 1 omitCenter 5][size]"
explorer.file.child.labelingTemplate
: Labeling template for child node of file source, use for preview when previewAction is labeling.
Type:Default:string
"[fullpath][link][diagnosticError][diagnosticWarning][git][size][timeAccessed][timeModified][timeCreated][readonly][modified]"
explorer.file.column.link.copy
: Whether the file has been copied.
Type:Default:string
null
explorer.file.column.clip.copy
: Whether the file has been copied.
Type:Default:string
null
explorer.file.column.clip.cut
: Whether the file has been cut.
Type:Default:string
null
explorer.file.column.indent.chars
: Indent chars for file source.
Type:Default:string
" "
explorer.file.column.indent.indentLine
: Whether to display the alignment line.
Type:Default:boolean
null
explorer.file.cdCommand
: Change directory when performing the cd action.
Type:Default:false | 'cd' | 'tcd'
false
explorer.filename.colored.enable
: Enable colored filenames based on status.
Type:Default:boolean | {
diagnosticError?: boolean;
diagnosticWarning?: boolean;
git?: boolean;
[k: string]: unknown | undefined;
}true
explorer.file.git.showUntrackedFiles
: Show untracked file in git.
Type:Default:boolean | 'system'
null
explorer.trash.command
: Trash command template, arguments(%s source filepath, %l source filepath list), example: 'trash-put %l', 'mv --backup=t %l ~/.trash/'.
Type:Default:('nodejs:module' | 'trash-put %s') | string
"nodejs:module"
explorer.diagnostic.displayMax
: Maximum count of diagnostic column.
Type:Default:number
99
explorer.diagnostic.enableSubscriptNumber
: Subscript number for diagnostic count.
Type:Default:boolean
false
explorer.git.enable
: Enable git.
Type:Default:boolean
true
explorer.git.command
: Git command.
Type:Default:string
"git"
explorer.git.icon.rootStatus.stashed
: Icon for a stash exists for the local repository.
Type:Default:string
"$"
explorer.git.icon.rootStatus.ahead
: Icon for current branch ahead of upstream.
Type:Default:string
"⇡"
explorer.git.icon.rootStatus.behind
: Icon for current branch behind upstream.
Type:Default:string
"⇣"
explorer.git.icon.rootStatus.conflicted
: Icon for current branch has merge conflicts.
Type:Default:string
"="
explorer.git.icon.rootStatus.untracked
: Icon for there are untracked files in the working directory.
Type:Default:string
"?"
explorer.git.icon.rootStatus.modified
: Icon for there are file modifications in the working directory.
Type:Default:string
"~"
explorer.git.icon.rootStatus.added
: Icon for a new file has been added to the staging area.
Type:Default:string
"+"
explorer.git.icon.rootStatus.renamed
: Icon for a renamed file has been added to the staging area.
Type:Default:string
"→"
explorer.git.icon.rootStatus.deleted
: Icon for a file's deletion has been added to the staging area.
Type:Default:string
"✗"
explorer.git.icon.status.mixed
: Icon for git mixed status.
Type:Default:string
"*"
explorer.git.icon.status.unmodified
: Icon for git unmodified status.
Type:Default:string
" "
explorer.git.icon.status.modified
: Icon for git modified status.
Type:Default:string
"M"
explorer.git.icon.status.added
: Icon for git added status.
Type:Default:string
"A"
explorer.git.icon.status.deleted
: Icon for git removed status.
Type:Default:string
"D"
explorer.git.icon.status.renamed
: Icon for git renamed status.
Type:Default:string
"R"
explorer.git.icon.status.copied
: Icon for git copied status.
Type:Default:string
"C"
explorer.git.icon.status.unmerged
: Icon for git unmerged status.
Type:Default:string
"U"
explorer.git.icon.status.untracked
: Icon for git untracked status.
Type:Default:string
"?"
explorer.git.icon.status.ignored
: Icon for git ignored status.
Type:Default:string
"!"
explorer.git.showIgnored
: Show ignored files in git.
Type:Default:boolean
true
explorer.debug
: Enable debug.
Type:Default:boolean
false
## Inspired by
- VSCode Explorer
- [Shougo/vimfiler.vim](https://github.com/Shougo/vimfiler.vim)
- [Shougo/defx.nvim](https://github.com/Shougo/defx.nvim)
- [lambdalisue/fern.vim](https://github.com/lambdalisue/fern.vim)