mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-12-19 13:19:48 +01:00
dev: redefine diagnostics as submodules
This commit is contained in:
parent
500c9b67dd
commit
2f09d48e7c
2 changed files with 242 additions and 236 deletions
|
@ -24,38 +24,38 @@ in {
|
||||||
];
|
];
|
||||||
|
|
||||||
vim.luaConfigRC.nvimtreelua = nvim.dag.entryAnywhere ''
|
vim.luaConfigRC.nvimtreelua = nvim.dag.entryAnywhere ''
|
||||||
${
|
${
|
||||||
lib.optionalString (cfg.openOnSetup) ''
|
lib.optionalString (cfg.openOnSetup) ''
|
||||||
-- Open on startup has been deprecated
|
-- Open on startup has been deprecated
|
||||||
-- see https://github.com/nvim-tree/nvim-tree.lua/wiki/Open-At-Startup
|
-- see https://github.com/nvim-tree/nvim-tree.lua/wiki/Open-At-Startup
|
||||||
|
|
||||||
-- use a nix eval to dynamically insert the open on startup function
|
-- use a nix eval to dynamically insert the open on startup function
|
||||||
local function open_nvim_tree(data)
|
local function open_nvim_tree(data)
|
||||||
local IGNORED_FT = {
|
local IGNORED_FT = {
|
||||||
"markdown",
|
"markdown",
|
||||||
}
|
}
|
||||||
|
|
||||||
-- buffer is a real file on the disk
|
-- buffer is a real file on the disk
|
||||||
local real_file = vim.fn.filereadable(data.file) == 1
|
local real_file = vim.fn.filereadable(data.file) == 1
|
||||||
|
|
||||||
-- buffer is a [No Name]
|
-- buffer is a [No Name]
|
||||||
local no_name = data.file == "" and vim.bo[data.buf].buftype == ""
|
local no_name = data.file == "" and vim.bo[data.buf].buftype == ""
|
||||||
|
|
||||||
-- &ft
|
-- &ft
|
||||||
local filetype = vim.bo[data.buf].ft
|
local filetype = vim.bo[data.buf].ft
|
||||||
|
|
||||||
-- only files please
|
-- only files please
|
||||||
if not real_file and not no_name then
|
if not real_file and not no_name then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
-- skip ignored filetypes
|
-- skip ignored filetypes
|
||||||
if vim.tbl_contains(IGNORED_FT, filetype) then
|
if vim.tbl_contains(IGNORED_FT, filetype) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
-- open the tree but don't focus it
|
-- open the tree but don't focus it
|
||||||
require("nvim-tree.api").tree.toggle({ focus = false })
|
require("nvim-tree.api").tree.toggle({ focus = false })
|
||||||
end
|
end
|
||||||
|
|
||||||
-- function to automatically open the tree on VimEnter
|
-- function to automatically open the tree on VimEnter
|
||||||
|
@ -63,86 +63,86 @@ in {
|
||||||
''
|
''
|
||||||
}
|
}
|
||||||
|
|
||||||
${
|
${
|
||||||
lib.optionalString (cfg.disableNetrw) ''
|
lib.optionalString (cfg.disableNetrw) ''
|
||||||
vim.g.loaded_netrw = 1
|
vim.g.loaded_netrw = 1
|
||||||
vim.g.loaded_netrwPlugin = 1
|
vim.g.loaded_netrwPlugin = 1
|
||||||
''
|
''
|
||||||
}
|
}
|
||||||
|
|
||||||
require'nvim-tree'.setup({
|
require'nvim-tree'.setup({
|
||||||
disable_netrw = ${boolToString cfg.disableNetrw},
|
disable_netrw = ${boolToString cfg.disableNetrw},
|
||||||
hijack_netrw = ${boolToString cfg.hijackNetrw},
|
hijack_netrw = ${boolToString cfg.hijackNetrw},
|
||||||
auto_reload_on_write = ${boolToString cfg.autoreloadOnWrite},
|
auto_reload_on_write = ${boolToString cfg.autoreloadOnWrite},
|
||||||
|
|
||||||
sort = {
|
sort = {
|
||||||
sorter = "${cfg.sort.sorter}",
|
sorter = "${cfg.sort.sorter}",
|
||||||
folders_first = ${boolToString cfg.sort.foldersFirst},
|
folders_first = ${boolToString cfg.sort.foldersFirst},
|
||||||
|
},
|
||||||
|
|
||||||
|
hijack_unnamed_buffer_when_opening = ${boolToString cfg.hijackUnnamedBufferWhenOpening},
|
||||||
|
hijack_cursor = ${boolToString cfg.hijackCursor},
|
||||||
|
root_dirs = ${nvim.lua.listToLuaTable cfg.rootDirs},
|
||||||
|
prefer_startup_root = ${boolToString cfg.preferStartupRoot},
|
||||||
|
sync_root_with_cwd = ${boolToString cfg.syncRootWithCwd},
|
||||||
|
reload_on_bufenter = ${boolToString cfg.reloadOnBufEnter},
|
||||||
|
respect_buf_cwd = ${boolToString cfg.respectBufCwd},
|
||||||
|
|
||||||
|
hijack_directories = {
|
||||||
|
enable = ${boolToString cfg.hijackDirectories.enable},
|
||||||
|
auto_open = ${boolToString cfg.hijackDirectories.autoOpen},
|
||||||
|
},
|
||||||
|
|
||||||
|
update_focused_file = {
|
||||||
|
enable = ${boolToString cfg.updateFocusedFile.enable},
|
||||||
|
update_root = ${boolToString cfg.updateFocusedFile.updateRoot},
|
||||||
|
ignore_list = ${nvim.lua.listToLuaTable cfg.updateFocusedFile.ignoreList},
|
||||||
|
},
|
||||||
|
|
||||||
|
system_open = {
|
||||||
|
cmd = "${cfg.systemOpen.cmd}",
|
||||||
|
args = ${nvim.lua.listToLuaTable cfg.systemOpen.args},
|
||||||
|
},
|
||||||
|
|
||||||
|
diagnostics = {
|
||||||
|
enable = ${boolToString cfg.diagnostics.enable},
|
||||||
|
icons = {
|
||||||
|
hint = "${cfg.diagnostics.icons.hint}",
|
||||||
|
info = "${cfg.diagnostics.icons.info}",
|
||||||
|
warning = "${cfg.diagnostics.icons.warning}",
|
||||||
|
error = "${cfg.diagnostics.icons.error}",
|
||||||
},
|
},
|
||||||
|
|
||||||
hijack_unnamed_buffer_when_opening = ${boolToString cfg.hijackUnnamedBufferWhenOpening},
|
severity = {
|
||||||
hijack_cursor = ${boolToString cfg.hijackCursor},
|
min = "vim.diagnostic.severity.${cfg.diagnostics.severity.min}",
|
||||||
root_dirs = ${nvim.lua.listToLuaTable cfg.rootDirs},
|
max = "vim.diagnostic.severity.${cfg.diagnostics.severity.max}",
|
||||||
prefer_startup_root = ${boolToString cfg.preferStartupRoot},
|
|
||||||
sync_root_with_cwd = ${boolToString cfg.syncRootWithCwd},
|
|
||||||
reload_on_bufenter = ${boolToString cfg.reloadOnBufEnter},
|
|
||||||
respect_buf_cwd = ${boolToString cfg.respectBufCwd},
|
|
||||||
|
|
||||||
hijack_directories = {
|
|
||||||
enable = ${boolToString cfg.hijackDirectories.enable},
|
|
||||||
auto_open = ${boolToString cfg.hijackDirectories.autoOpen},
|
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
|
||||||
update_focused_file = {
|
git = {
|
||||||
enable = ${boolToString cfg.updateFocusedFile.enable},
|
enable = ${boolToString cfg.git.enable},
|
||||||
update_root = ${boolToString cfg.updateFocusedFile.updateRoot},
|
show_on_dirs = ${boolToString cfg.git.showOnDirs},
|
||||||
ignore_list = ${nvim.lua.listToLuaTable cfg.updateFocusedFile.ignoreList},
|
show_on_open_dirs = ${boolToString cfg.git.showOnOpenDirs},
|
||||||
},
|
disable_for_dirs = ${nvim.lua.listToLuaTable cfg.git.disableForDirs},
|
||||||
|
timeout = ${toString cfg.git.timeOut},
|
||||||
|
},
|
||||||
|
|
||||||
system_open = {
|
modified = {
|
||||||
cmd = "${cfg.systemOpen.cmd}",
|
enable = ${boolToString cfg.modified.enable},
|
||||||
args = ${nvim.lua.listToLuaTable cfg.systemOpen.args},
|
show_on_dirs = ${boolToString cfg.modified.showOnDirs},
|
||||||
},
|
show_on_open_dirs = ${boolToString cfg.modified.showOnOpenDirs},
|
||||||
|
},
|
||||||
|
|
||||||
diagnostics = {
|
filesystem_watchers = {
|
||||||
enable = ${boolToString cfg.diagnostics.enable},
|
enable = ${boolToString cfg.filesystemWatchers.enable},
|
||||||
icons = {
|
debounce_delay = ${toString cfg.filesystemWatchers.debounceDelay},
|
||||||
hint = "${cfg.diagnostics.icons.hint}",
|
ignore_dirs = ${nvim.lua.listToLuaTable cfg.filesystemWatchers.ignoreDirs},
|
||||||
info = "${cfg.diagnostics.icons.info}",
|
},
|
||||||
warning = "${cfg.diagnostics.icons.warning}",
|
|
||||||
error = "${cfg.diagnostics.icons.error}",
|
|
||||||
},
|
|
||||||
|
|
||||||
severity = {
|
select_prompts = ${boolToString cfg.selectPrompts},
|
||||||
min = "vim.diagnostic.severity.${cfg.diagnostics.severity.min}",
|
|
||||||
max = "vim.diagnostic.severity.${cfg.diagnostics.severity.max}",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
git = {
|
view = {
|
||||||
enable = ${boolToString cfg.git.enable},
|
centralize_selection = ${boolToString cfg.view.centralizeSelection},
|
||||||
show_on_dirs = ${boolToString cfg.git.showOnDirs},
|
|
||||||
show_on_open_dirs = ${boolToString cfg.git.showOnOpenDirs},
|
|
||||||
disable_for_dirs = ${nvim.lua.listToLuaTable cfg.git.disableForDirs},
|
|
||||||
timeout = ${toString cfg.git.timeOut},
|
|
||||||
},
|
|
||||||
|
|
||||||
modified = {
|
|
||||||
enable = ${boolToString cfg.modified.enable},
|
|
||||||
show_on_dirs = ${boolToString cfg.modified.showOnDirs},
|
|
||||||
show_on_open_dirs = ${boolToString cfg.modified.showOnOpenDirs},
|
|
||||||
},
|
|
||||||
|
|
||||||
filesystem_watchers = {
|
|
||||||
enable = ${boolToString cfg.filesystemWatchers.enable},
|
|
||||||
debounce_delay = ${toString cfg.filesystemWatchers.debounceDelay},
|
|
||||||
ignore_dirs = ${nvim.lua.listToLuaTable cfg.filesystemWatchers.ignoreDirs},
|
|
||||||
},
|
|
||||||
|
|
||||||
select_prompts = ${boolToString cfg.selectPrompts},
|
|
||||||
|
|
||||||
view = {
|
|
||||||
centralize_selection = ${boolToString cfg.view.centralizeSelection},
|
|
||||||
cursorline = ${boolToString cfg.view.cursorline},
|
cursorline = ${boolToString cfg.view.cursorline},
|
||||||
debounce_delay = ${toString cfg.view.debounceDelay},
|
debounce_delay = ${toString cfg.view.debounceDelay},
|
||||||
width = ${nvim.lua.expToLua cfg.view.width},
|
width = ${nvim.lua.expToLua cfg.view.width},
|
||||||
|
@ -181,123 +181,126 @@ in {
|
||||||
},
|
},
|
||||||
|
|
||||||
special_files = ${nvim.lua.listToLuaTable cfg.renderer.specialFiles},
|
special_files = ${nvim.lua.listToLuaTable cfg.renderer.specialFiles},
|
||||||
symlink_destination = ${boolToString cfg.renderer.symlinkDestination},
|
symlink_destination = ${boolToString cfg.renderer.symlinkDestination},
|
||||||
|
|
||||||
icons = {
|
icons = {
|
||||||
webdev_colors = ${boolToString cfg.renderer.icons.webdevColors},
|
webdev_colors = ${boolToString cfg.renderer.icons.webdevColors},
|
||||||
git_placement = "${cfg.renderer.icons.gitPlacement}",
|
git_placement = "${cfg.renderer.icons.gitPlacement}",
|
||||||
modified_placement = "${cfg.renderer.icons.modifiedPlacement}",
|
modified_placement = "${cfg.renderer.icons.modifiedPlacement}",
|
||||||
padding = "${cfg.renderer.icons.padding}",
|
padding = "${cfg.renderer.icons.padding}",
|
||||||
symlink_arrow = "${cfg.renderer.icons.symlinkArrow}",
|
symlink_arrow = "${cfg.renderer.icons.symlinkArrow}",
|
||||||
|
|
||||||
show = {
|
show = {
|
||||||
git = ${boolToString cfg.renderer.icons.show.git},
|
git = ${boolToString cfg.renderer.icons.show.git},
|
||||||
folder = ${boolToString cfg.renderer.icons.show.folder},
|
folder = ${boolToString cfg.renderer.icons.show.folder},
|
||||||
folder_arrow = ${boolToString cfg.renderer.icons.show.folderArrow},
|
folder_arrow = ${boolToString cfg.renderer.icons.show.folderArrow},
|
||||||
file = ${boolToString cfg.renderer.icons.show.file},
|
file = ${boolToString cfg.renderer.icons.show.file},
|
||||||
modified = ${boolToString cfg.renderer.icons.show.modified},
|
modified = ${boolToString cfg.renderer.icons.show.modified},
|
||||||
},
|
},
|
||||||
|
|
||||||
glyphs = {
|
glyphs = {
|
||||||
default = "${cfg.renderer.icons.glyphs.default}",
|
default = "${cfg.renderer.icons.glyphs.default}",
|
||||||
symlink = "${cfg.renderer.icons.glyphs.symlink}",
|
symlink = "${cfg.renderer.icons.glyphs.symlink}",
|
||||||
modified = "${cfg.renderer.icons.glyphs.modified}",
|
modified = "${cfg.renderer.icons.glyphs.modified}",
|
||||||
|
|
||||||
folder = {
|
folder = {
|
||||||
default = "${cfg.renderer.icons.glyphs.folder.default}",
|
default = "${cfg.renderer.icons.glyphs.folder.default}",
|
||||||
open = "${cfg.renderer.icons.glyphs.folder.open}",
|
open = "${cfg.renderer.icons.glyphs.folder.open}",
|
||||||
arrow_open = "${cfg.renderer.icons.glyphs.folder.arrowOpen}",
|
arrow_open = "${cfg.renderer.icons.glyphs.folder.arrowOpen}",
|
||||||
arrow_closed = "${cfg.renderer.icons.glyphs.folder.arrowClosed}",
|
arrow_closed = "${cfg.renderer.icons.glyphs.folder.arrowClosed}",
|
||||||
empty = "${cfg.renderer.icons.glyphs.folder.empty}",
|
empty = "${cfg.renderer.icons.glyphs.folder.empty}",
|
||||||
empty_open = "${cfg.renderer.icons.glyphs.folder.emptyOpen}",
|
empty_open = "${cfg.renderer.icons.glyphs.folder.emptyOpen}",
|
||||||
symlink = "${cfg.renderer.icons.glyphs.folder.symlink}",
|
symlink = "${cfg.renderer.icons.glyphs.folder.symlink}",
|
||||||
symlink_open = "${cfg.renderer.icons.glyphs.folder.symlinkOpen}",
|
symlink_open = "${cfg.renderer.icons.glyphs.folder.symlinkOpen}",
|
||||||
},
|
},
|
||||||
|
|
||||||
git = {
|
git = {
|
||||||
unstaged = "${cfg.renderer.icons.glyphs.git.unstaged}",
|
unstaged = "${cfg.renderer.icons.glyphs.git.unstaged}",
|
||||||
staged = "${cfg.renderer.icons.glyphs.git.staged}",
|
staged = "${cfg.renderer.icons.glyphs.git.staged}",
|
||||||
unmerged = "${cfg.renderer.icons.glyphs.git.unmerged}",
|
unmerged = "${cfg.renderer.icons.glyphs.git.unmerged}",
|
||||||
renamed = "${cfg.renderer.icons.glyphs.git.renamed}",
|
renamed = "${cfg.renderer.icons.glyphs.git.renamed}",
|
||||||
untracked = "${cfg.renderer.icons.glyphs.git.untracked}",
|
untracked = "${cfg.renderer.icons.glyphs.git.untracked}",
|
||||||
deleted = "${cfg.renderer.icons.glyphs.git.deleted}",
|
deleted = "${cfg.renderer.icons.glyphs.git.deleted}",
|
||||||
ignored = "${cfg.renderer.icons.glyphs.git.ignored}",
|
ignored = "${cfg.renderer.icons.glyphs.git.ignored}",
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
filters = {
|
filters = {
|
||||||
git_ignored = ${boolToString cfg.filters.gitIgnored},
|
git_ignored = ${boolToString cfg.filters.gitIgnored},
|
||||||
dotfiles = ${boolToString cfg.filters.dotfiles},
|
dotfiles = ${boolToString cfg.filters.dotfiles},
|
||||||
git_clean = ${boolToString cfg.filters.gitClean},
|
git_clean = ${boolToString cfg.filters.gitClean},
|
||||||
no_buffer = ${boolToString cfg.filters.noBuffer},
|
no_buffer = ${boolToString cfg.filters.noBuffer},
|
||||||
exclude = ${nvim.lua.listToLuaTable cfg.filters.exclude},
|
exclude = ${nvim.lua.listToLuaTable cfg.filters.exclude},
|
||||||
},
|
},
|
||||||
|
|
||||||
trash = {
|
trash = {
|
||||||
cmd = "${cfg.trash.cmd}",
|
cmd = "${cfg.trash.cmd}",
|
||||||
},
|
},
|
||||||
|
|
||||||
actions = {
|
actions = {
|
||||||
use_system_clipboard = ${boolToString cfg.actions.useSystemClipboard},
|
use_system_clipboard = ${boolToString cfg.actions.useSystemClipboard},
|
||||||
change_dir = {
|
change_dir = {
|
||||||
enable = ${boolToString cfg.actions.changeDir.enable},
|
enable = ${boolToString cfg.actions.changeDir.enable},
|
||||||
global = ${boolToString cfg.actions.changeDir.global},
|
global = ${boolToString cfg.actions.changeDir.global},
|
||||||
restrict_above_cwd = ${boolToString cfg.actions.changeDir.restrictAboveCwd},
|
restrict_above_cwd = ${boolToString cfg.actions.changeDir.restrictAboveCwd},
|
||||||
},
|
},
|
||||||
|
|
||||||
expand_all = {
|
expand_all = {
|
||||||
max_folder_discovery = ${toString cfg.actions.expandAll.maxFolderDiscovery},
|
max_folder_discovery = ${toString cfg.actions.expandAll.maxFolderDiscovery},
|
||||||
exclude = ${nvim.lua.listToLuaTable cfg.actions.expandAll.exclude},
|
exclude = ${nvim.lua.listToLuaTable cfg.actions.expandAll.exclude},
|
||||||
},
|
},
|
||||||
|
|
||||||
file_popup = {
|
file_popup = {
|
||||||
open_win_config = ${nvim.lua.expToLua cfg.actions.filePopup.openWinConfig},
|
open_win_config = ${nvim.lua.expToLua cfg.actions.filePopup.openWinConfig},
|
||||||
},
|
},
|
||||||
|
|
||||||
open_file = {
|
open_file = {
|
||||||
quit_on_open = ${boolToString cfg.actions.openFile.quitOnOpen},
|
quit_on_open = ${boolToString cfg.actions.openFile.quitOnOpen},
|
||||||
eject = ${boolToString cfg.actions.openFile.eject},
|
eject = ${boolToString cfg.actions.openFile.eject},
|
||||||
resize_window = ${boolToString cfg.actions.openFile.resizeWindow},
|
resize_window = ${boolToString cfg.actions.openFile.resizeWindow},
|
||||||
window_picker = {
|
window_picker = {
|
||||||
enable = ${boolToString cfg.actions.openFile.windowPicker.enable},
|
enable = ${boolToString cfg.actions.openFile.windowPicker.enable},
|
||||||
picker = "${cfg.actions.openFile.windowPicker.picker}",
|
picker = "${cfg.actions.openFile.windowPicker.picker}",
|
||||||
chars = "${cfg.actions.openFile.windowPicker.chars}",
|
chars = "${cfg.actions.openFile.windowPicker.chars}",
|
||||||
exclude = {
|
exclude = {
|
||||||
filetype = ${nvim.lua.listToLuaTable cfg.actions.openFile.windowPicker.exclude.filetype},
|
filetype = ${nvim.lua.listToLuaTable cfg.actions.openFile.windowPicker.exclude.filetype},
|
||||||
buftype = ${nvim.lua.listToLuaTable cfg.actions.openFile.windowPicker.exclude.buftype},
|
buftype = ${nvim.lua.listToLuaTable cfg.actions.openFile.windowPicker.exclude.buftype},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
remove_file = {
|
||||||
|
close_window = ${boolToString cfg.actions.removeFile.closeWindow},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
|
||||||
|
|
||||||
remove_file = {
|
live_filter = {
|
||||||
close_window = ${boolToString cfg.actions.removeFile.closeWindow},
|
prefix = "${cfg.liveFilter.prefix}",
|
||||||
},
|
always_show_folders = ${boolToString cfg.liveFilter.alwaysShowFolders},
|
||||||
},
|
},
|
||||||
|
|
||||||
live_filter = {
|
tab = {
|
||||||
prefix = "${cfg.liveFilter.prefix}",
|
sync = {
|
||||||
always_show_folders = ${boolToString cfg.liveFilter.alwaysShowFolders},
|
open = ${boolToString cfg.tab.sync.open},
|
||||||
},
|
close = ${boolToString cfg.tab.sync.close},
|
||||||
|
ignore = ${nvim.lua.listToLuaTable cfg.tab.sync.ignore},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
tab = {
|
notify = {
|
||||||
sync = {
|
threshold = vim.log.levels.${cfg.notify.threshold},
|
||||||
open = ${boolToString cfg.tab.sync.open},
|
absolute_path = ${boolToString cfg.notify.absolutePath},
|
||||||
close = ${boolToString cfg.tab.sync.close},
|
},
|
||||||
ignore = ${nvim.lua.listToLuaTable cfg.tab.sync.ignore},
|
|
||||||
},
|
ui = {
|
||||||
},
|
confirm = {
|
||||||
notify = {
|
remove = ${boolToString cfg.ui.confirm.remove},
|
||||||
threshold = vim.log.levels.${cfg.notify.threshold},
|
trash = ${boolToString cfg.ui.confirm.trash},
|
||||||
absolute_path = ${boolToString cfg.notify.absolutePath},
|
},
|
||||||
},
|
},
|
||||||
ui = {
|
})
|
||||||
confirm = {
|
'';
|
||||||
remove = ${boolToString cfg.ui.confirm.remove},
|
|
||||||
trash = ${boolToString cfg.ui.confirm.trash},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})'';
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -118,6 +118,12 @@ with builtins; {
|
||||||
|
|
||||||
hijackDirectories = mkOption {
|
hijackDirectories = mkOption {
|
||||||
description = "hijack new directory buffers when they are opened (`:e dir`).";
|
description = "hijack new directory buffers when they are opened (`:e dir`).";
|
||||||
|
|
||||||
|
default = {
|
||||||
|
enable = true;
|
||||||
|
autoOpen = false;
|
||||||
|
};
|
||||||
|
|
||||||
type = types.submodule {
|
type = types.submodule {
|
||||||
options = {
|
options = {
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
|
@ -136,10 +142,6 @@ with builtins; {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
default = {
|
|
||||||
enable = true;
|
|
||||||
autoOpen = false;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
updateFocusedFile = mkOption {
|
updateFocusedFile = mkOption {
|
||||||
|
@ -147,6 +149,13 @@ with builtins; {
|
||||||
Update the focused file on `BufEnter`, un-collapses the folders recursively
|
Update the focused file on `BufEnter`, un-collapses the folders recursively
|
||||||
until it finds the file.
|
until it finds the file.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
default = {
|
||||||
|
enable = false;
|
||||||
|
updateRoot = false;
|
||||||
|
ignoreList = [];
|
||||||
|
};
|
||||||
|
|
||||||
type = types.submodule {
|
type = types.submodule {
|
||||||
options = {
|
options = {
|
||||||
enable = mkEnableOption "update focused file";
|
enable = mkEnableOption "update focused file";
|
||||||
|
@ -169,9 +178,6 @@ with builtins; {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
default = {
|
|
||||||
ignoreList = [];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
systemOpen = {
|
systemOpen = {
|
||||||
|
@ -199,11 +205,23 @@ with builtins; {
|
||||||
debounceDelay = 50;
|
debounceDelay = 50;
|
||||||
showOnDirs = false;
|
showOnDirs = false;
|
||||||
showOnOpenDirs = true;
|
showOnOpenDirs = true;
|
||||||
|
|
||||||
|
icons = {
|
||||||
|
hint = "";
|
||||||
|
info = "";
|
||||||
|
warning = "";
|
||||||
|
error = "";
|
||||||
|
};
|
||||||
|
|
||||||
|
severity = {
|
||||||
|
min = "HINT";
|
||||||
|
max = "ERROR";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
type = types.submodule {
|
type = types.submodule {
|
||||||
options = {
|
options = {
|
||||||
enable = mkEnableOption "diagnostics";
|
enable = mkEnableOption "Enable diagnostics view in the signcolumn.";
|
||||||
|
|
||||||
debounceDelay = mkOption {
|
debounceDelay = mkOption {
|
||||||
description = "Idle milliseconds between diagnostic event and update.";
|
description = "Idle milliseconds between diagnostic event and update.";
|
||||||
|
@ -212,24 +230,17 @@ with builtins; {
|
||||||
|
|
||||||
showOnDirs = mkOption {
|
showOnDirs = mkOption {
|
||||||
description = "Show diagnostic icons on parent directories.";
|
description = "Show diagnostic icons on parent directories.";
|
||||||
type = types.bool;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
showOnOpenDirs = mkOption {
|
showOnOpenDirs = mkOption {
|
||||||
description = "Show diagnostics icons on directories that are open.";
|
description = ''
|
||||||
type = types.bool;
|
Show diagnostics icons on directories that are open.
|
||||||
|
Only relevant when `diagnostics.show_on_dirs` is `true`.
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
icons = mkOption {
|
icons = mkOption {
|
||||||
description = "Icons for diagnostic severity.";
|
description = "Icons for diagnostic severity.";
|
||||||
|
|
||||||
default = {
|
|
||||||
hint = "";
|
|
||||||
info = "";
|
|
||||||
warning = "";
|
|
||||||
error = "";
|
|
||||||
};
|
|
||||||
|
|
||||||
type = types.submodule {
|
type = types.submodule {
|
||||||
options = {
|
options = {
|
||||||
hint = mkOption {
|
hint = mkOption {
|
||||||
|
@ -253,13 +264,7 @@ with builtins; {
|
||||||
};
|
};
|
||||||
|
|
||||||
severity = mkOption {
|
severity = mkOption {
|
||||||
description = "Severity for which the diagnostics will be displayed";
|
description = "Severity for which the diagnostics will be displayed. See `:help diagnostic-severity`";
|
||||||
|
|
||||||
default = {
|
|
||||||
min = "HINT";
|
|
||||||
max = "ERROR";
|
|
||||||
};
|
|
||||||
|
|
||||||
type = types.submodule {
|
type = types.submodule {
|
||||||
options = {
|
options = {
|
||||||
min = mkOption {
|
min = mkOption {
|
||||||
|
@ -316,6 +321,7 @@ with builtins; {
|
||||||
description = "Indicate which file have unsaved modification.";
|
description = "Indicate which file have unsaved modification.";
|
||||||
|
|
||||||
default = {
|
default = {
|
||||||
|
enable = false;
|
||||||
showOnDirs = true;
|
showOnDirs = true;
|
||||||
showOnOpenDirs = true;
|
showOnOpenDirs = true;
|
||||||
};
|
};
|
||||||
|
@ -382,6 +388,7 @@ with builtins; {
|
||||||
|
|
||||||
view = mkOption {
|
view = mkOption {
|
||||||
description = "Window / buffer setup.";
|
description = "Window / buffer setup.";
|
||||||
|
|
||||||
default = {
|
default = {
|
||||||
centralizeSelection = false;
|
centralizeSelection = false;
|
||||||
cursorline = true;
|
cursorline = true;
|
||||||
|
@ -405,6 +412,7 @@ with builtins; {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
type = types.submodule {
|
type = types.submodule {
|
||||||
options = {
|
options = {
|
||||||
centralizeSelection = mkOption {
|
centralizeSelection = mkOption {
|
||||||
|
@ -1066,13 +1074,6 @@ with builtins; {
|
||||||
options = {
|
options = {
|
||||||
sync = mkOption {
|
sync = mkOption {
|
||||||
description = "Configuration for syncing nvim-tree across tabs.";
|
description = "Configuration for syncing nvim-tree across tabs.";
|
||||||
|
|
||||||
default = {
|
|
||||||
open = false;
|
|
||||||
close = false;
|
|
||||||
ignore = [];
|
|
||||||
};
|
|
||||||
|
|
||||||
type = types.submodule {
|
type = types.submodule {
|
||||||
options = {
|
options = {
|
||||||
open = mkOption {
|
open = mkOption {
|
||||||
|
@ -1126,8 +1127,10 @@ with builtins; {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
ui = mkOption {
|
ui = mkOption {
|
||||||
description = "General UI configuration.";
|
description = "General UI configuration.";
|
||||||
|
|
||||||
default = {
|
default = {
|
||||||
confirm = {
|
confirm = {
|
||||||
remove = true;
|
remove = true;
|
||||||
|
|
Loading…
Reference in a new issue