plugins/filetrees: move to by-name

This commit is contained in:
Matt Sturgeon 2024-09-05 02:38:30 +01:00
parent ad85cd760e
commit d016b139fc
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299
9 changed files with 0 additions and 5 deletions

View file

@ -0,0 +1,142 @@
{
empty = {
plugins.chadtree.enable = true;
};
example = {
plugins.chadtree = {
enable = true;
options = {
follow = true;
mimetypes = {
warn = [
"audio"
"font"
"image"
"video"
];
allowExts = [ ".ts" ];
};
pageIncrement = 5;
pollingRate = 2.0;
session = true;
showHidden = false;
versionControl = true;
ignore = {
nameExact = [
".DS_Store"
".directory"
"thumbs.db"
".git"
];
nameGlob = [ ];
pathGlob = [ ];
};
};
view = {
openDirection = "left";
sortBy = [
"is_folder"
"ext"
"file_name"
];
width = 40;
windowOptions = {
cursorline = true;
number = false;
relativenumber = false;
signcolumn = "no";
winfixwidth = true;
wrap = false;
};
};
theme = {
highlights = {
ignored = "Comment";
bookmarks = "Title";
quickfix = "Label";
versionControl = "Comment";
};
iconGlyphSet = "devicons";
textColourSet = "env";
iconColourSet = "github";
};
keymap = {
windowManagement = {
quit = [ "q" ];
bigger = [
"+"
"="
];
smaller = [
"-"
"_"
];
refresh = [ "<c-r>" ];
};
rerooting = {
changeDir = [ "b" ];
changeFocus = [ "c" ];
changeFocusUp = [ "C" ];
};
openFileFolder = {
primary = [ "<enter>" ];
secondary = [
"<tab>"
"<2-leftmouse>"
];
tertiary = [
"<m-enter>"
"<middlemouse>"
];
vSplit = [ "w" ];
hSplit = [ "W" ];
openSys = [ "o" ];
collapse = [ "o" ];
};
cursor = {
refocus = [ "~" ];
jumpToCurrent = [ "J" ];
stat = [ "K" ];
copyName = [ "y" ];
copyBasename = [ "Y" ];
copyRelname = [ "<c-y>" ];
};
filtering = {
filter = [ "f" ];
clearFilter = [ "F" ];
};
bookmarks = {
bookmarkGoto = [ "m" ];
};
selecting = {
select = [ "s" ];
clearSelection = [ "S" ];
};
fileOperations = {
new = [ "a" ];
link = [ "A" ];
rename = [ "r" ];
toggleExec = [ "X" ];
copy = [ "p" ];
cut = [ "x" ];
delete = [ "d" ];
trash = [ "t" ];
};
toggles = {
toggleHidden = [ "." ];
toggleFollow = [ "u" ];
toggleVersionControl = [ "i" ];
};
};
};
};
no-packages = {
plugins.chadtree = {
enable = true;
iconsPackage = null;
};
};
}

View file

@ -0,0 +1,448 @@
{
empty = {
plugins.neo-tree.enable = true;
};
defaults = {
plugins.neo-tree = {
enable = true;
sources = [
"filesystem"
"buffers"
"git_status"
];
addBlankLineAtTop = false;
autoCleanAfterSessionRestore = false;
closeIfLastWindow = false;
defaultSource = "filesystem";
enableDiagnostics = true;
enableGitStatus = true;
enableModifiedMarkers = true;
enableRefreshOnWrite = true;
gitStatusAsync = true;
gitStatusAsyncOptions = {
batchSize = 1000;
batchDelay = 10;
maxLines = 10000;
};
hideRootNode = false;
retainHiddenRootIndent = false;
logLevel = "info";
logToFile = false;
openFilesInLastWindow = true;
popupBorderStyle = "NC";
resizeTimerInterval = 500;
sortCaseInsensitive = false;
sortFunction = "nil";
usePopupsForInput = true;
useDefaultMappings = true;
sourceSelector = {
winbar = false;
statusline = false;
showScrolledOffParentNode = false;
sources = [
{
source = "filesystem";
displayName = " Files ";
}
{
source = "buffers";
displayName = " Buffers ";
}
{
source = "gitStatus";
displayName = " Git ";
}
{
source = "diagnostics";
displayName = " Diagnostics ";
}
];
contentLayout = "start";
tabsLayout = "equal";
truncationCharacter = "";
tabsMinWidth = null;
tabsMaxWidth = null;
padding = 0;
separator = {
left = "";
right = "";
};
separatorActive = null;
showSeparatorOnEdge = false;
highlightTab = "NeoTreeTabInactive";
highlightTabActive = "NeoTreeTabActive";
highlightBackground = "NeoTreeTabInactive";
highlightSeparator = "NeoTreeTabSeparatorInactive";
highlightSeparatorActive = "NeoTreeTabSeparatorActive";
};
eventHandlers = {
before_render = ''
function (state)
-- add something to the state that can be used by custom components
end
'';
file_opened = ''
function(file_path)
--auto close
require("neo-tree").close_all()
end
'';
};
defaultComponentConfigs = {
container = {
enableCharacterFade = true;
width = "100%";
rightPadding = 0;
};
diagnostics = {
symbols = {
hint = "H";
info = "I";
warn = "!";
error = "X";
};
highlights = {
hint = "DiagnosticSignHint";
info = "DiagnosticSignInfo";
warn = "DiagnosticSignWarn";
error = "DiagnosticSignError";
};
};
indent = {
indentSize = 2;
padding = 1;
withMarkers = true;
indentMarker = "";
lastIndentMarker = "";
highlight = "NeoTreeIndentMarker";
withExpanders = null;
expanderCollapsed = "";
expanderExpanded = "";
expanderHighlight = "NeoTreeExpander";
};
icon = {
folderClosed = "";
folderOpen = "";
folderEmpty = "";
folderEmptyOpen = "";
default = "*";
highlight = "NeoTreeFileIcon";
};
modified = {
symbol = "[+] ";
highlight = "NeoTreeModified";
};
name = {
trailingSlash = false;
useGitStatusColors = true;
highlight = "NeoTreeFileName";
};
gitStatus = {
symbols = {
added = "";
deleted = "";
modified = "";
renamed = "";
untracked = "";
ignored = "";
unstaged = "";
staged = "";
conflict = "";
};
align = "right";
};
};
renderers = {
directory = [
"indent"
"icon"
"current_filter"
{
name = "container";
content = [
{
name = "name";
zindex = 10;
}
{
name = "clipboard";
zindex = 10;
}
{
name = "diagnostics";
errors_only = true;
zindex = 20;
align = "right";
hide_when_expanded = true;
}
{
name = "git_status";
zindex = 20;
align = "right";
hide_when_expanded = true;
}
];
}
];
file = [
"indent"
"icon"
{
name = "container";
content = [
{
name = "name";
zindex = 10;
}
{
name = "clipboard";
zindex = 10;
}
{
name = "bufnr";
zindex = 10;
}
{
name = "modified";
zindex = 20;
align = "right";
}
{
name = "diagnostics";
zindex = 20;
align = "right";
}
{
name = "git_status";
zindex = 20;
align = "right";
}
];
}
];
message = [
{
name = "indent";
with_markers = false;
}
{
name = "name";
highlight = "NeoTreeMessage";
}
];
terminal = [
"indent"
"icon"
"name"
"bufnr"
];
};
nestingRules = { };
window = {
position = "left";
width = 40;
height = 15;
autoExpandWidth = false;
popup = {
size = {
height = "80%";
width = "50%";
};
position = "80%";
};
sameLevel = false;
insertAs = "child";
mappingOptions = {
noremap = true;
nowait = true;
};
mappings = {
"<space>" = {
command = "toggle_node";
# disable `nowait` if you have existing combos starting with this char that you want to use
nowait = false;
};
"<2-LeftMouse>" = "open";
"<cr>" = "open";
"<esc>" = "revert_preview";
P = {
command = "toggle_preview";
config = {
use_float = true;
};
};
l = "focus_preview";
S = "open_split";
# S = "split_with_window_picker";
s = "open_vsplit";
# s = "vsplit_with_window_picker";
t = "open_tabnew";
# "<cr>" = "open_drop";
# t = "open_tab_drop";
w = "open_with_window_picker";
C = "close_node";
z = "close_all_nodes";
# Z = "expand_all_nodes";
R = "refresh";
a = {
command = "add";
# some commands may take optional config options, see `:h neo-tree-mappings` for details
config = {
show_path = "none"; # "none", "relative", "absolute"
};
};
A = "add_directory"; # also accepts the config.show_path and config.insert_as options.
d = "delete";
r = "rename";
y = "copy_to_clipboard";
x = "cut_to_clipboard";
p = "paste_from_clipboard";
c = "copy"; # takes text input for destination, also accepts the config.show_path and config.insert_as options
m = "move"; # takes text input for destination, also accepts the config.show_path and config.insert_as options
e = "toggle_auto_expand_width";
q = "close_window";
"?" = "show_help";
"<" = "prev_source";
">" = "next_source";
};
};
filesystem = {
window = {
mappings = {
H = "toggle_hidden";
"/" = "fuzzy_finder";
D = "fuzzy_finder_directory";
# "/" = "filter_as_you_type"; # this was the default until v1.28
"#" = "fuzzy_sorter"; # fuzzy sorting using the fzy algorithm
# D = "fuzzy_sorter_directory";
f = "filter_on_submit";
"<C-x>" = "clear_filter";
"<bs>" = "navigate_up";
"." = "set_root";
"[g" = "prev_git_modified";
"]g" = "next_git_modified";
};
};
asyncDirectoryScan = "auto";
scanMode = "shallow";
bindToCwd = true;
cwdTarget = {
sidebar = "tab";
current = "window";
};
filteredItems = {
visible = false;
forceVisibleInEmptyFolder = false;
showHiddenCount = true;
hideDotfiles = true;
hideGitignored = true;
hideHidden = true;
hideByName = [
".DS_Store"
"thumbs.db"
];
hideByPattern = [ ];
alwaysShow = [ ];
neverShow = [ ];
neverShowByPattern = [ ];
};
findByFullPathWords = false;
findCommand = "fd";
findArgs = {
fd = [
"--exclude"
".git"
"--exclude"
"node_modules"
];
};
groupEmptyDirs = false;
searchLimit = 50;
followCurrentFile = {
enabled = false;
leaveDirsOpen = false;
};
hijackNetrwBehavior = "open_default";
useLibuvFileWatcher = false;
};
buffers = {
bindToCwd = true;
followCurrentFile = {
enabled = true;
leaveDirsOpen = false;
};
groupEmptyDirs = true;
window = {
mappings = {
"<bs>" = "navigate_up";
"." = "set_root";
bd = "buffer_delete";
};
};
};
gitStatus = {
window = {
mappings = {
A = "git_add_all";
gu = "git_unstage_file";
ga = "git_add_file";
gr = "git_revert_file";
gc = "git_commit";
gp = "git_push";
gg = "git_commit_and_push";
};
};
};
example = {
renderers = {
custom = [
"indent"
{
name = "icon";
default = "C";
}
"custom"
"name"
];
};
window = {
mappings = {
"<cr>" = "toggle_node";
"<C-e>" = "example_command";
d = "show_debug_info";
};
};
};
documentSymbols = {
followCursor = false;
kinds = {
File = {
icon = "󰈙";
hl = "Tag";
};
Namespace = {
icon = "󰌗";
hl = "Include";
};
};
customKinds = {
"12" = "foo";
"15" = "bar";
};
};
};
};
no-packages = {
plugins.neo-tree = {
enable = true;
iconsPackage = null;
gitPackage = null;
};
};
}

View file

@ -0,0 +1,267 @@
{
empty = {
plugins.nvim-tree.enable = true;
};
defaults = {
plugins.nvim-tree = {
enable = true;
disableNetrw = true;
hijackNetrw = false;
openOnSetup = true;
openOnSetupFile = true;
ignoreBufferOnSetup = true;
ignoreFtOnSetup = [ "tex" ];
autoClose = true;
autoReloadOnWrite = true;
sortBy = "name";
hijackUnnamedBufferWhenOpening = false;
hijackCursor = false;
rootDirs = [ ];
preferStartupRoot = false;
syncRootWithCwd = false;
reloadOnBufenter = false;
respectBufCwd = false;
hijackDirectories = {
enable = true;
autoOpen = true;
};
updateFocusedFile = {
enable = false;
updateRoot = false;
ignoreList = [ ];
};
systemOpen = {
cmd = "";
args = [ ];
};
diagnostics = {
enable = false;
debounceDelay = 50;
showOnDirs = false;
showOnOpenDirs = true;
icons = {
hint = "";
info = "";
warning = "";
error = "";
};
severity = {
min = "hint";
max = "error";
};
};
git = {
enable = true;
ignore = true;
showOnDirs = true;
showOnOpenDirs = true;
timeout = 400;
};
modified = {
enable = false;
showOnDirs = true;
showOnOpenDirs = true;
};
filesystemWatchers = {
enable = true;
debounceDelay = 50;
ignoreDirs = [ ];
};
onAttach = "default";
selectPrompts = false;
view = {
centralizeSelection = false;
cursorline = true;
debounceDelay = 15;
width = {
min = 30;
max = -1;
padding = 1;
};
side = "left";
preserveWindowProportions = false;
number = false;
relativenumber = false;
signcolumn = "yes";
float = {
enable = false;
quitOnFocusLoss = true;
openWinConfig = {
col = 1;
row = 1;
relative = "cursor";
border = "shadow";
style = "minimal";
};
};
};
renderer = {
addTrailing = false;
groupEmpty = false;
fullName = false;
highlightGit = false;
highlightOpenedFiles = "none";
highlightModified = "none";
rootFolderLabel = ":~:s?$?/..?";
indentWidth = 2;
indentMarkers = {
enable = false;
inlineArrows = true;
icons = {
corner = "";
edge = "";
item = "";
bottom = "";
none = " ";
};
};
icons = {
webdevColors = true;
gitPlacement = "before";
modifiedPlacement = "after";
padding = " ";
symlinkArrow = " ";
show = {
file = true;
folder = true;
folderArrow = true;
git = true;
modified = true;
};
glyphs = {
default = "";
symlink = "";
modified = "";
folder = {
arrowClosed = "";
arrowOpen = "";
default = "";
open = "";
empty = "";
emptyOpen = "";
symlink = "";
symlinkOpen = "";
};
git = {
unstaged = "";
staged = "";
unmerged = "";
renamed = "";
untracked = "";
deleted = "";
ignored = "";
};
};
};
specialFiles = [
"Cargo.toml"
"Makefile"
"README.md"
"readme.md"
];
symlinkDestination = true;
};
filters = {
dotfiles = false;
gitClean = false;
noBuffer = false;
custom = [ ];
exclude = [ ];
};
actions = {
changeDir = {
enable = true;
global = false;
restrictAboveCwd = false;
};
expandAll = {
maxFolderDiscovery = 300;
exclude = [ ];
};
filePopup = {
openWinConfig = {
col = 1;
row = 1;
relative = "cursor";
border = "shadow";
style = "minimal";
};
};
openFile = {
quitOnOpen = false;
resizeWindow = true;
};
windowPicker = {
enable = true;
picker = "default";
chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
exclude = {
filetype = [
"notify"
"packer"
"qf"
"diff"
"fugitive"
"fugitiveblame"
];
buftype = [
"nofile"
"terminal"
"help"
];
};
};
removeFile = {
closeWindow = true;
};
useSystemClipboard = true;
};
liveFilter = {
prefix = "[FILTER]: ";
alwaysShowFolders = true;
};
tab = {
sync = {
open = false;
close = false;
ignore = [ ];
};
};
notify = {
threshold = "info";
};
ui = {
confirm = {
remove = true;
trash = true;
};
};
log = {
enable = false;
truncate = false;
types = {
all = false;
profile = false;
config = false;
copyPaste = false;
dev = false;
diagnostics = false;
git = false;
watcher = false;
};
};
};
};
no-packages = {
plugins.nvim-tree = {
enable = true;
iconsPackage = null;
gitPackage = null;
};
};
}

View file

@ -0,0 +1,67 @@
{
empty = {
plugins.yazi.enable = true;
};
defaults = {
plugins.yazi = {
enable = true;
settings = {
log_level = "off";
open_for_directories = false;
use_ya_for_events_reading = false;
use_yazi_client_id_flag = false;
enable_mouse_support = false;
open_file_function.__raw = ''
function(chosen_file)
vim.cmd(string.format("edit %s", vim.fn.fnameescape(chosen_file)))
end
'';
clipboard_register = "*";
keymaps = {
show_help = "<f1>";
open_file_in_vertical_split = "<c-v>";
open_file_in_horizontal_split = "<c-x>";
open_file_in_tab = "<c-t>";
grep_in_directory = "<c-s>";
replace_in_directory = "<c-g>";
cycle_open_buffers = "<tab>";
copy_relative_path_to_selected_files = "<c-y>";
send_to_quickfix_list = "<c-q>";
};
set_keymappings_function = null;
hooks = {
yazi_opened.__raw = ''
function(preselected_path, yazi_buffer_id, config)
end
'';
yazi_closed_successfully.__raw = ''
function(chosen_file, config, state)
end
'';
yazi_opened_multiple_files.__raw = ''
function(chosen_files)
vim.cmd("args" .. table.concat(chosen_files, " "))
end
'';
};
highlight_groups = {
hovered_buffer = null;
};
floating_window_scaling_factor = 0.9;
yazi_floating_window_winblend = 0;
yazi_floating_window_border = "rounded";
};
};
};
}