Regenerate nvim config
@ -0,0 +1,41 @@
|
||||
# Architecture
|
||||
|
||||
## Asynchronous Event Loop
|
||||
|
||||
CHADTree uses it's own event loop aside from the `asyncio` one defined by the [`pynvim` client](https://github.com/neovim/pynvim).
|
||||
|
||||
In fact, `pynvim` doesn't even run in the main thread.
|
||||
|
||||
All RPC notifications from the `nvim` server are sent to a global message queue, which is then processed in order of arrival after initialization code.
|
||||
|
||||
No further messages can be processed until the previous ones have.
|
||||
|
||||
`nvim` never blocks on the notifications. The CHADTree client has no blocking API.
|
||||
|
||||
## Parallelism
|
||||
|
||||
CHADTree uses a traditional threadpool for parallelizable operations, this includes querying for `git` status and file system walking, as well as other minor ones such as `mv` or `cp`.
|
||||
|
||||
The fs walk is done using a native parallel BFS strategy with a chunking step to avoid flooding the thread pool. This is not optimal since a [Fork Join](https://en.wikipedia.org/wiki/Fork%E2%80%93join_model) model should be more efficient.
|
||||
|
||||
However, as benchmarked, the performance bottleneck is in fact not the filesystem, but text & decorations rendering.
|
||||
|
||||
## Virtual Rendering
|
||||
|
||||
It turns out, if you have thousands lines of text with decorations such as colour or virtual text, `nvim` struggles to update buffers, even if you batch the render in a single call.
|
||||
|
||||
The answer is to have a virtual render target, and to compute the minimal necessary render instructions.
|
||||
|
||||
Previously I had written [Noact](https://github.com/ms-jpq/noact), a 70 line React like virtual dom engine. CHADTree works similarly, except with a more sophisticated diff algorithm, since the native approach does not cope with flat lists. (A flat list is a degenerate tree)
|
||||
|
||||
Instead of Virtual DOM nodes, a hash is used for each desired line of the render target.
|
||||
|
||||
## Memorylessness
|
||||
|
||||
CHADTree is designed with [Memorylessness](https://en.wikipedia.org/wiki/Memorylessness) in mind. For the most part the state transitions in CHADTree follow the Markov Property in that each successive state is independent from history.
|
||||
|
||||
## Pipelining
|
||||
|
||||
Broadly speaking, CHADTree has a two stage pipeline. The first stage processes messages, and generates render and cursor placement instructions for the second stage.
|
||||
|
||||
Ideally the first stage should be referentially transparent, with zero side effects, while the second stage executes all of the side effects. However, this is too tedious, a memoryless approach is taken for the two stages instead.
|
||||
326
config/neovim/store/lazy-plugins/chadtree/docs/CONFIGURATION.md
Normal file
@ -0,0 +1,326 @@
|
||||
# Configurations
|
||||
|
||||
All configurations are under the global variable **`chadtree_settings`**.
|
||||
|
||||
VimL:
|
||||
|
||||
```vim
|
||||
let g:chadtree_settings = { ... }
|
||||
```
|
||||
|
||||
Lua:
|
||||
|
||||
```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
|
||||
|
||||
```json
|
||||
{ "dog.puppy": 2 }
|
||||
```
|
||||
|
||||
```json
|
||||
{ "dog": { "puppy": 2 } }
|
||||
```
|
||||
|
||||
Note in lua, you will need to quote your keys like so:
|
||||
|
||||
```lua
|
||||
{ ["dog.puppy"] = 2 }
|
||||
```
|
||||
|
||||
Note in VimL, to specify `True` and `False`, you need to use the following:
|
||||
|
||||
```vim
|
||||
v:true
|
||||
v:false
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Validation
|
||||
|
||||
Variables will be validated against a schema.
|
||||
|
||||
ie.
|
||||
|
||||
```vim
|
||||
let g:chadtree_settings = { 'ignore.dog': 'scratch, stratch' }
|
||||
```
|
||||
|
||||
Will give you the following error message:
|
||||
|
||||

|
||||
|
||||
**Notice it says `Extra keys: {dog}`**
|
||||
|
||||
---
|
||||
|
||||
## Specifics
|
||||
|
||||
The default configuration can be found under an [`yaml` file](https://github.com/ms-jpq/chadtree/tree/chad/config/defaults.yml)
|
||||
|
||||
---
|
||||
|
||||
### 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:**
|
||||
|
||||
```json
|
||||
false
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### chadtree_settings.keymap
|
||||
|
||||
See help docs on [keybind](https://github.com/ms-jpq/chadtree/tree/chad/docs/KEYBIND.md)
|
||||
|
||||
---
|
||||
|
||||
### chadtree_settings.options
|
||||
|
||||
#### `chadtree_settings.options.follow`
|
||||
|
||||
CHADTree will highlight currently open file, and open all its parents.
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
true
|
||||
```
|
||||
|
||||
#### `chadtree_settings.options.follow_links`
|
||||
|
||||
CHADTree will follow symlinks
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
true
|
||||
```
|
||||
|
||||
#### `chadtree_settings.options.lang`
|
||||
|
||||
CHADTree will guess your locale from [unix environmental variables](https://pubs.opengroup.org/onlinepubs/7908799/xbd/envvar.html).
|
||||
|
||||
Set to `c` to disable emojis.
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
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](https://www.iana.org/assignments/media-types/media-types.xhtml)'s mimetype database.
|
||||
|
||||
##### `chadtree_settings.options.mimetypes.warn`
|
||||
|
||||
Show a warning before opening these datatypes
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
["audio", "font", "image", "video"]
|
||||
```
|
||||
|
||||
##### `chadtree_settings.options.mimetypes.allow_exts`
|
||||
|
||||
Skip warning for these extensions
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
[".ts"]
|
||||
```
|
||||
|
||||
#### `chadtree_settings.options.page_increment`
|
||||
|
||||
Change how many lines `{` and `}` scroll
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
5
|
||||
```
|
||||
|
||||
#### `chadtree_settings.options.min_diagnostics_severity`
|
||||
|
||||
Lower is more severe.
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
2
|
||||
```
|
||||
|
||||
#### `chadtree_settings.options.polling_rate`
|
||||
|
||||
CHADTree's background refresh rate
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
2.0
|
||||
```
|
||||
|
||||
#### `chadtree_settings.options.session`
|
||||
|
||||
Save & restore currently open folders
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
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:**
|
||||
|
||||
```json
|
||||
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:**
|
||||
|
||||
```json
|
||||
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:**
|
||||
|
||||
```json
|
||||
[".DS_Store", ".directory", "thumbs.db", ".git"]
|
||||
```
|
||||
|
||||
#### `chadtree_settings.ignore.name_glob`
|
||||
|
||||
Files whose name match these [glob patterns](https://en.wikipedia.org/wiki/Glob_%28programming%29) will be ignored.
|
||||
|
||||
ie. `*.py` will match all python files
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
[]
|
||||
```
|
||||
|
||||
#### `chadtree_settings.ignore.path_glob`
|
||||
|
||||
Files whose full path match these [glob patterns](https://en.wikipedia.org/wiki/Glob_%28programming%29) will be ignored.
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
[]
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### chadtree_settings.view
|
||||
|
||||
Some options to change CHADTree's appearance
|
||||
|
||||
#### `chadtree_settings.view.open_direction`
|
||||
|
||||
Which way does CHADTree open?
|
||||
|
||||
**legal keys: one of**
|
||||
|
||||
```json
|
||||
["left", "right"]
|
||||
```
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
"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**
|
||||
|
||||
```json
|
||||
["is_folder", "ext", "file_name_lower", "file_name"]
|
||||
```
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
["is_folder", "ext", "file_name_lower", "file_name"]
|
||||
```
|
||||
|
||||
#### `chadtree_settings.view.width`
|
||||
|
||||
How big is CHADTree when initially opened?
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
40
|
||||
```
|
||||
|
||||
#### `chadtree_settings.view.window_options`
|
||||
|
||||
Set of window local options to for CHADTree windows
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
{
|
||||
"cursorline": true,
|
||||
"number": false,
|
||||
"relativenumber": false,
|
||||
"signcolumn": "no",
|
||||
"winfixwidth": true,
|
||||
"wrap": false
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### chadtree_settings.theme
|
||||
|
||||
See help docs on [themes](https://github.com/ms-jpq/chadtree/tree/chad/docs/THEME.md)
|
||||
41
config/neovim/store/lazy-plugins/chadtree/docs/FEATURES.md
Normal file
@ -0,0 +1,41 @@
|
||||
# Features
|
||||
|
||||
## Filtering
|
||||
|
||||

|
||||
|
||||
## Follow Mode
|
||||
|
||||

|
||||
|
||||
## Git Integrations
|
||||
|
||||

|
||||
|
||||
## Quickfix
|
||||
|
||||

|
||||
|
||||
## Sessions
|
||||
|
||||

|
||||
|
||||
## Visual Select
|
||||
|
||||

|
||||
|
||||
## Github Colours
|
||||
|
||||

|
||||
|
||||
## LS_COLORS
|
||||
|
||||

|
||||
|
||||
## LS -l statistics
|
||||
|
||||

|
||||
|
||||
## MimeType warning
|
||||
|
||||

|
||||
433
config/neovim/store/lazy-plugins/chadtree/docs/KEYBIND.md
Normal file
@ -0,0 +1,433 @@
|
||||
# Keybinds
|
||||
|
||||
Keybinds can be customized under `chadtree_settings.keymap.<key>` with a set of keys.
|
||||
|
||||
---
|
||||
|
||||
## Window management
|
||||
|
||||
##### `chadtree_settings.keymap.quit`
|
||||
|
||||
Close CHADTree window, quit if it is the last window.
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
["q"]
|
||||
```
|
||||
|
||||
##### `chadtree_settings.keymap.bigger`
|
||||
|
||||
Resize CHADTree window bigger.
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
["+", "="]
|
||||
```
|
||||
|
||||
##### `chadtree_settings.keymap.smaller`
|
||||
|
||||
Resize CHADTree window smaller.
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
["-", "_"]
|
||||
```
|
||||
|
||||
##### `chadtree_settings.keymap.refresh`
|
||||
|
||||
Refresh CHADTree.
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
["<c-r>"]
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Rerooting CHADTree
|
||||
|
||||
##### `chadtree_settings.keymap.change_dir`
|
||||
|
||||
Change vim's working directory.
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
["b"]
|
||||
```
|
||||
|
||||
##### `chadtree_settings.keymap.change_focus`
|
||||
|
||||
Set CHADTree's root to folder at cursor. Does not change working directory.
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
["c"]
|
||||
```
|
||||
|
||||
##### `chadtree_settings.keymap.change_focus_up`
|
||||
|
||||
Set CHADTree's root one level up.
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
["C"]
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Open file / folder
|
||||
|
||||
Any of the keys that open files will double as a open / close toggle on folders.
|
||||
|
||||
##### `chadtree_settings.keymap.primary`
|
||||
|
||||
Open file at cursor.
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
["<enter>"]
|
||||
```
|
||||
|
||||
##### `chadtree_settings.keymap.secondary`
|
||||
|
||||
Open file at cursor, keep cursor in CHADTree's window.
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
["<tab>", "<2-leftmouse>"]
|
||||
```
|
||||
|
||||
##### `chadtree_settings.keymap.tertiary`
|
||||
|
||||
Open file at cursor in a new tab.
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
["<m-enter>", "<middlemouse>"]
|
||||
```
|
||||
|
||||
##### `chadtree_settings.keymap.v_split`
|
||||
|
||||
Open file at cursor in vertical split.
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
["w"]
|
||||
```
|
||||
|
||||
##### `chadtree_settings.keymap.h_split`
|
||||
|
||||
Open file at cursor in horizontal split.
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
["W"]
|
||||
```
|
||||
|
||||
##### `chadtree_settings.keymap.open_sys`
|
||||
|
||||
Open file with GUI tools using `open` or `xdg open`. This will open third party tools such as `Finder` or `KDE Dolphin` or `GNOME nautilus`, etc. Depends on platform and user setup.
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
["o"]
|
||||
```
|
||||
|
||||
##### `chadtree_settings.keymap.collapse`
|
||||
|
||||
Collapse all subdirectories for directory at cursor.
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
["<s-tab>", "`"]
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Doing things with cursor
|
||||
|
||||
##### `chadtree_settings.keymap.refocus`
|
||||
|
||||
Put cursor at the root of CHADTree
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
["~"]
|
||||
```
|
||||
|
||||
##### `chadtree_settings.keymap.jump_to_current`
|
||||
|
||||
Position cursor in CHADTree at currently open buffer, if the buffer points to a location visible under CHADTree.
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
["J"]
|
||||
```
|
||||
|
||||
##### `chadtree_settings.keymap.stat`
|
||||
|
||||
Print `ls --long` stat for file under cursor.
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
["K"]
|
||||
```
|
||||
|
||||
##### `chadtree_settings.keymap.copy_name`
|
||||
|
||||
Copy paths of files under cursor or visual block.
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
["Y"]
|
||||
```
|
||||
|
||||
##### `chadtree_settings.keymap.copy_basename`
|
||||
|
||||
Copy names of files under cursor or visual block.
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
["y"]
|
||||
```
|
||||
|
||||
##### `chadtree_settings.keymap.copy_relname`
|
||||
|
||||
Copy relative paths of files under cursor or visual block.
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
["<c-y>"]
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Filtering
|
||||
|
||||
##### `chadtree_settings.keymap.filter`
|
||||
|
||||
Set a glob pattern to narrow down visible files.
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
["f"]
|
||||
```
|
||||
|
||||
##### `chadtree_settings.keymap.clear_filter`
|
||||
|
||||
Clear filter.
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
["F"]
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Bookmarks
|
||||
|
||||
##### `chadtree_settings.keymap.bookmark_goto`
|
||||
|
||||
Goto bookmark `A-Z`.
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
["m"]
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Selecting
|
||||
|
||||
##### `chadtree_settings.keymap.select`
|
||||
|
||||
Select files under cursor or visual block.
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
["s"]
|
||||
```
|
||||
|
||||
##### `chadtree_settings.keymap.clear_selection`
|
||||
|
||||
Clear selection.
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
["S"]
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## File operations
|
||||
|
||||
##### `chadtree_settings.keymap.new`
|
||||
|
||||
Create new file at location under cursor. Files ending with platform specific path separator will be folders.
|
||||
|
||||
Intermediary folders are created automatically.
|
||||
|
||||
ie. `uwu/owo/` under `unix` will create `uwu/` then `owo/` under it. Both are folders.
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
["a"]
|
||||
```
|
||||
|
||||
##### `chadtree_settings.keymap.link`
|
||||
|
||||
Create links at location under cursor from selection.
|
||||
|
||||
Links are always relative.
|
||||
|
||||
Intermediary folders are created automatically.
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
["A"]
|
||||
```
|
||||
|
||||
##### `chadtree_settings.keymap.rename`
|
||||
|
||||
Rename file under cursor.
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
["r"]
|
||||
```
|
||||
|
||||
##### `chadtree_settings.keymap.toggle_exec`
|
||||
|
||||
Toggle all the `+x` bits of the selected / highlighted files.
|
||||
|
||||
Except for directories, where `-x` will prevent reading.
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
["X"]
|
||||
```
|
||||
|
||||
##### `chadtree_settings.keymap.copy`
|
||||
|
||||
Copy the selected files to location under cursor.
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
["p"]
|
||||
```
|
||||
|
||||
##### `chadtree_settings.keymap.cut`
|
||||
|
||||
Move the selected files to location under cursor.
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
["x"]
|
||||
```
|
||||
|
||||
##### `chadtree_settings.keymap.delete`
|
||||
|
||||
Delete the selected files. Items deleted cannot be recovered.
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
["d"]
|
||||
```
|
||||
|
||||
##### `chadtree_settings.keymap.trash`
|
||||
|
||||
Trash the selected files using platform specific `trash` command, if they are available. Items trashed may be recovered.
|
||||
|
||||
You need [`brew install trash`](https://formulae.brew.sh/formula/trash) for MacOS and [`pip3 install trash-cli`](https://github.com/andreafrancia/trash-cli) on Linux.
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
["t"]
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Toggle settings on / off
|
||||
|
||||
##### `chadtree_settings.keymap.toggle_hidden`
|
||||
|
||||
Toggle `show_hidden` on and off. See `chadtree_settings.options.show_hidden` for details.
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
["."]
|
||||
```
|
||||
|
||||
##### `chadtree_settings.keymap.toggle_follow`
|
||||
|
||||
Toggle `follow` on and off. See `chadtree_settings.options.follow` for details.
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
["u"]
|
||||
```
|
||||
|
||||
##### `chadtree_settings.keymap.toggle_follow_links`
|
||||
|
||||
Toggle `follow_links` on and off. See `chadtree_settings.options.follow_links` for details.
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
["U"]
|
||||
```
|
||||
|
||||
##### `chadtree_settings.keymap.toggle_follow_ignore`
|
||||
|
||||
Toggle `follow_ignore` on and off. See `chadtree_settings.options.follow_ignore` for details.
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
["T"]
|
||||
```
|
||||
|
||||
##### `chadtree_settings.keymap.toggle_version_control`
|
||||
|
||||
Toggle version control integration on and off
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
["i"]
|
||||
```
|
||||
116
config/neovim/store/lazy-plugins/chadtree/docs/MIGRATION.md
Normal file
@ -0,0 +1,116 @@
|
||||
# Migration
|
||||
|
||||
Hello everybody, I am dropping support for `python_version < 3.8.2` for the main branch.
|
||||
|
||||
Please use the `legacy` branch if you cannot use newer versions of `python`.
|
||||
|
||||
I am very sorry about this, but I am doing this in order to support more awesome features.
|
||||
|
||||
## What you need to do:
|
||||
|
||||
Run the following once after updating your git repo to latest
|
||||
|
||||
```vim
|
||||
:UpdateRemotePlugins
|
||||
```
|
||||
|
||||
Change your extension manager to use the following:
|
||||
|
||||
```vim
|
||||
Plug 'ms-jpq/chadtree', {'branch': 'chad', 'do': 'python3 -m chadtree deps'}
|
||||
|
||||
```
|
||||
|
||||
Run `:CHADdeps` the first time before you use `:CHADopen`
|
||||
|
||||
**Check out [`new configuration`](https://github.com/ms-jpq/chadtree/blob/chad/docs/CONFIGURATION.md)**. It is incompatible with the old one, BUT comes with a new parser and vaildator so the migration will be mostly just renaming one or two keys.
|
||||
|
||||
If you make a typo, CHADTree will tell you so!
|
||||
|
||||
## Why?
|
||||
|
||||
Several reasons:
|
||||
|
||||
Python `3.8.2` is the version of `python` on the latest Ubuntu LTS.
|
||||
|
||||
There are some features I wanted to add that strictly cannot be supported below `python 3.8`. For example, I wanted to include a spec validator, but `python 3.7` lacks support for `Literal` in the `typing` module, and therefore could introduce ambiguities in the parser.
|
||||
|
||||
The old CHADTree ran by `nvim`'s default extension implementation, which had major short comings:
|
||||
|
||||
1. Everything ran in the same process.
|
||||
|
||||
2. The user needs to call `:UpdateRemotePlugins` each time I add a new RPC end point, or else they will get a random confusing error.
|
||||
|
||||
3. [`pynvim`](https://github.com/neovim/pynvim) needed to be installed, For most users who aren't familiar with how `pip` and python modules work. This will either mess up their usage of `virtualenv`, or require a global or user level `pip` package just to use CHADTree.
|
||||
|
||||
In order to fix these issues, I will have to make breaking changes anyways, why not now?
|
||||
|
||||
## Solutions
|
||||
|
||||
At the cost of one time migration, which means users need to update their configs and perhaps python version. I will deilver enough features to warrant the upgrade.
|
||||
|
||||
## New Features
|
||||
|
||||
### Independent package management
|
||||
|
||||
CHADTree now will use all local dependencies. Which means `pynvim` can be installed under a subdirectory to `chadtree`. Doing a `rm -rf` on CHADTree will cleanly remove everything it brings in.
|
||||
|
||||
Nothing will pollute the global namespace for python.
|
||||
|
||||
### Isolated Process
|
||||
|
||||
CHADTree now runs inside an isolated process! Not only will it start faster, it will also be isolated from your other python plugins. In case of errors or crashes, they will not affect each other nearly as much!
|
||||
|
||||
### New Vaildating Config Parser
|
||||
|
||||
CHADTree will now validate your typos and misunderstandings on how to configure it! No more silent failures. If you make a typo in the config, it will tell you loud and clear!
|
||||
|
||||
New `property.sub_property` syntax also supported on a recursive level.
|
||||
|
||||
### Faster startup
|
||||
|
||||
CHADTree started up kinda of slowly before. I have made it perceptibly faster through various marginal improvements.
|
||||
|
||||
### Bigly Improved Documentation
|
||||
|
||||
CHADTree now comes with it's own help command!
|
||||
|
||||
Use `:CHADhelp {topic}` to open up built-in help docs in a floating window.
|
||||
|
||||
Use `:CHADhelp {topic} --web` to open up the same help docs in a browser.
|
||||
|
||||
### Parallel File System Operations
|
||||
|
||||
Previously CHADTree was fast because it was async.
|
||||
|
||||
Now CHADTree can be even faster because it does things in parallel.
|
||||
|
||||
See [design document here](https://github.com/ms-jpq/chadtree/tree/chad/docs/ARCHITECTURE.md) for details.
|
||||
|
||||
### Vastly Improved Rendering Speed
|
||||
|
||||
You know how React is famous because it only renders what needs to be changed?
|
||||
|
||||
CHADTree now uses a React-like virtual rendering target. It only re-renders the minimal amount of lines. CHADTree can now handle thousands of visible files and still be reasonably performant!
|
||||
|
||||
_This is only visible when you have 1000+ files visible. The old ways was fast enough for most tasks._
|
||||
|
||||
### Theming
|
||||
|
||||
Yub, this is yuge. The #1 request was for more themes. They have came!
|
||||
|
||||
Go see `:CHADhelp theme` for [details](https://github.com/ms-jpq/chadtree/tree/chad/docs/THEME.md).
|
||||
|
||||
### Even more Polish
|
||||
|
||||
- Maintain cursor position in many circumstances, ie. move root up / down, filtering for files, renaming, creating files, etc
|
||||
|
||||
- Selection of hidden / invisible files no longer possible.
|
||||
|
||||
- Retain selection when copying or moving files.
|
||||
|
||||
- Now shows `git submodules`
|
||||
|
||||
### Even Higher Quality Code
|
||||
|
||||
Yes the quality of code is a feature. The better the code, the easier it is for me and other people to add in future improvements.
|
||||
43
config/neovim/store/lazy-plugins/chadtree/docs/README.md
Normal file
@ -0,0 +1,43 @@
|
||||
# Docs
|
||||
|
||||
Use `:CHADhelp` to open up a list of help pages!
|
||||
|
||||
Help docs are written in `markdown` because a picture is worth a thousand words.
|
||||
|
||||
Use `:CHADhelp -w` or `:CHADhelp --web` to open help pages in a browser window if possible.
|
||||
|
||||
Use `:CHADhelp {topic}` or `:CHADhelp {topic} --web` to visit a particular topic for more information
|
||||
|
||||
- [:CHADhelp features](https://github.com/ms-jpq/chadtree/tree/chad/docs/FEATURES.md)
|
||||
|
||||
- [:CHADhelp keybind](https://github.com/ms-jpq/chadtree/tree/chad/docs/KEYBIND.md)
|
||||
|
||||
- [:CHADhelp config](https://github.com/ms-jpq/chadtree/tree/chad/docs/CONFIGURATION.md)
|
||||
|
||||
- [:CHADhelp theme](https://github.com/ms-jpq/chadtree/tree/chad/docs/THEME.md)
|
||||
|
||||
- [:CHADhelp migration](https://github.com/ms-jpq/chadtree/tree/chad/docs/MIGRATION.md)
|
||||
|
||||
---
|
||||
|
||||
## Commands
|
||||
|
||||
### `CHADopen`
|
||||
|
||||
`:CHADopen` will toggle CHADTree open / close
|
||||
|
||||
`:CHADopen <path>` will open at `<path>`
|
||||
|
||||
`:CHADopen --always-focus` will disable toggle if already opened
|
||||
|
||||
`:CHADopen --nofocus` will open CHADTree without giving the sidebar focus
|
||||
|
||||
`:CHADopen --version-ctl` will open CHADTree at version control top level.
|
||||
|
||||
### `CHADdeps`
|
||||
|
||||
`:CHADdeps` will install all of CHADTree's dependencies locally.
|
||||
|
||||
Dependencies will be privately installed inside CHADTree's git root under `.vars/runtime`.
|
||||
|
||||
Running `rm -rf` on `chadtree/` will cleanly remove everything CHADTree installs to your local system.
|
||||
154
config/neovim/store/lazy-plugins/chadtree/docs/THEME.md
Normal file
@ -0,0 +1,154 @@
|
||||
# Theme
|
||||
|
||||
CHADTree does not define it's own theme, outside of some minimal defaults.
|
||||
|
||||
All themes are imported from other open source projects.
|
||||
|
||||
You can customize themes using the `chadtree_settings.theme` settings.
|
||||
|
||||
---
|
||||
|
||||
### `chadtree_settings.theme.highlights`
|
||||
|
||||
Vim comes with some built-in highlight groups, these are used to colour things which I cannot find good imports for.
|
||||
|
||||
see `:help highlight-groups`
|
||||
|
||||
#### `chadtree_settings.theme.highlights.ignored`
|
||||
|
||||
These are used for files that are ignored by user supplied pattern in `chadtree_settings.ignore` and by version control.
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
"Comment"
|
||||
```
|
||||
|
||||
#### `chadtree_settings.theme.highlights.bookmarks`
|
||||
|
||||
These are used to show bookmarks.
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
"Title"
|
||||
```
|
||||
|
||||
#### `chadtree_settings.theme.highlights.quickfix`
|
||||
|
||||
These are used to notify the number of times a file / folder appears in the `quickfix` list.
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
"Label"
|
||||
```
|
||||
|
||||
#### `chadtree_settings.theme.highlights.version_control`
|
||||
|
||||
These are used to put a version control status beside each file.
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
"Comment"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### `chadtree_settings.theme.icon_glyph_set`
|
||||
|
||||
To use **devicons**, you will need [supported fonts](https://github.com/ryanoasis/nerd-fonts#font-installation)
|
||||
|
||||
**devicons:**
|
||||
|
||||
Imported from [vim-devicons](https://github.com/ryanoasis/vim-devicons)
|
||||
|
||||

|
||||
|
||||
**emoji:**
|
||||
|
||||
Imported from [vim-emoji-icon-theme](https://github.com/adelarsq/vim-emoji-icon-theme)
|
||||
|
||||

|
||||
|
||||
**ascii:**
|
||||
|
||||

|
||||
|
||||
**ascii_hollow:**
|
||||
|
||||

|
||||
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
"devicons"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### `chadtree_settings.theme.text_colour_set`
|
||||
|
||||
On `unix`, the command `ls` can produce coloured results based on the `LS_COLORS` environmental variable.
|
||||
|
||||
CHADTree can pretend it's `ls` by setting `chadtree_settings.theme.text_colour_set` to `env`.
|
||||
|
||||
If you are not happy with that, you can choose one of the many others:
|
||||
|
||||
- [dircolors-solarized](https://github.com/seebi/dircolors-solarized)
|
||||
|
||||
- [nord-dircolors](https://github.com/arcticicestudio/nord-dircolors)
|
||||
|
||||
- [trapd00r](https://github.com/trapd00r/LS_COLORS)
|
||||
|
||||
- [vim-nerdtree-syntax-highlight](https://github.com/tiagofumo/vim-nerdtree-syntax-highlight)
|
||||
|
||||
**legal keys: one of**
|
||||
|
||||
```json
|
||||
[
|
||||
"env",
|
||||
"solarized_dark_256",
|
||||
"solarized_dark",
|
||||
"solarized_light",
|
||||
"solarized_universal",
|
||||
"nord",
|
||||
"trapdoor",
|
||||
"nerdtree_syntax_light",
|
||||
"nerdtree_syntax_dark"
|
||||
]
|
||||
```
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
"env"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### `chadtree_settings.theme.icon_colour_set`
|
||||
|
||||
Right now you all the file icons are coloured according to [Github colours](https://github.com/github/linguist).
|
||||
|
||||
You may also disable colouring if you wish.
|
||||
|
||||
**github:**
|
||||
|
||||

|
||||
|
||||
**legal keys: one of**
|
||||
|
||||
```json
|
||||
["github", "none"]
|
||||
```
|
||||
|
||||
**default:**
|
||||
|
||||
```json
|
||||
"github"
|
||||
```
|
||||
|
||||
---
|
||||
BIN
config/neovim/store/lazy-plugins/chadtree/docs/img/bookmarks.png
Normal file
|
After Width: | Height: | Size: 151 KiB |
BIN
config/neovim/store/lazy-plugins/chadtree/docs/img/filtering.gif
Normal file
|
After Width: | Height: | Size: 981 KiB |
BIN
config/neovim/store/lazy-plugins/chadtree/docs/img/follow.gif
Normal file
|
After Width: | Height: | Size: 2.4 MiB |
|
After Width: | Height: | Size: 6.2 MiB |
|
After Width: | Height: | Size: 49 KiB |
|
After Width: | Height: | Size: 181 KiB |
|
After Width: | Height: | Size: 156 KiB |
|
After Width: | Height: | Size: 169 KiB |
|
After Width: | Height: | Size: 244 KiB |
|
After Width: | Height: | Size: 329 KiB |
BIN
config/neovim/store/lazy-plugins/chadtree/docs/img/ls_l.png
Normal file
|
After Width: | Height: | Size: 86 KiB |
BIN
config/neovim/store/lazy-plugins/chadtree/docs/img/mimetype.png
Normal file
|
After Width: | Height: | Size: 79 KiB |
BIN
config/neovim/store/lazy-plugins/chadtree/docs/img/quickfix.gif
Normal file
|
After Width: | Height: | Size: 2.2 MiB |
|
After Width: | Height: | Size: 66 KiB |
BIN
config/neovim/store/lazy-plugins/chadtree/docs/img/session.gif
Normal file
|
After Width: | Height: | Size: 3.5 MiB |
|
After Width: | Height: | Size: 3.1 MiB |