mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-22 13:20:44 +00:00
dev: revert nvimtree changes
This commit is contained in:
parent
03b53d8c34
commit
ffb9f85392
1 changed files with 2 additions and 44 deletions
|
@ -22,19 +22,13 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
treeWidth = mkOption {
|
treeWidth = mkOption {
|
||||||
default = 30;
|
default = 25;
|
||||||
description = "Width of the tree in charecters";
|
description = "Width of the tree in charecters";
|
||||||
type = types.int;
|
type = types.int;
|
||||||
};
|
};
|
||||||
|
|
||||||
adaptiveSize = mkOption {
|
|
||||||
default = true;
|
|
||||||
description = "Whether to enable adaptiveSize";
|
|
||||||
type = types.bool;
|
|
||||||
};
|
|
||||||
|
|
||||||
hideFiles = mkOption {
|
hideFiles = mkOption {
|
||||||
default = [".git" "node_modules" ".cache" ".idea"];
|
default = [".git" "node_modules" ".cache"];
|
||||||
description = "Files to hide in the file view by default.";
|
description = "Files to hide in the file view by default.";
|
||||||
type = with types; listOf str;
|
type = with types; listOf str;
|
||||||
};
|
};
|
||||||
|
@ -45,10 +39,6 @@ in {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
};
|
};
|
||||||
|
|
||||||
highlightGit = {
|
|
||||||
mkEnableOption = "Enable git highlights";
|
|
||||||
};
|
|
||||||
|
|
||||||
openOnSetup = mkOption {
|
openOnSetup = mkOption {
|
||||||
default = true;
|
default = true;
|
||||||
description = "Open when vim is started on a directory";
|
description = "Open when vim is started on a directory";
|
||||||
|
@ -115,12 +105,6 @@ in {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
};
|
};
|
||||||
|
|
||||||
hijackCursor = mkOption {
|
|
||||||
default = true;
|
|
||||||
description = "Keeps the cursor on the first letter of the filename when moving in the tree";
|
|
||||||
type = types.bool;
|
|
||||||
};
|
|
||||||
|
|
||||||
trailingSlash = mkOption {
|
trailingSlash = mkOption {
|
||||||
default = true;
|
default = true;
|
||||||
description = "Add a trailing slash to all folders";
|
description = "Add a trailing slash to all folders";
|
||||||
|
@ -144,25 +128,6 @@ in {
|
||||||
description = "The command used to open a file with the associated default program";
|
description = "The command used to open a file with the associated default program";
|
||||||
type = types.str;
|
type = types.str;
|
||||||
};
|
};
|
||||||
|
|
||||||
syncRootWithCwd = mkOption {
|
|
||||||
default = true;
|
|
||||||
description = "Changes the tree root directory on `DirChanged` and refreshes the tree";
|
|
||||||
type = types.bool;
|
|
||||||
};
|
|
||||||
|
|
||||||
updateFocusedFile = {
|
|
||||||
mkEnableOption = "Enable updateFocusedFile";
|
|
||||||
update_cwd = mkOption {
|
|
||||||
default = false;
|
|
||||||
description = "";
|
|
||||||
type = types.bool;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystemWatchers = {
|
|
||||||
mkEnableOption = "Enable fileSystemWatchers";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
@ -179,7 +144,6 @@ in {
|
||||||
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},
|
||||||
hijack_cursor = ${boolToString cfg.hijackCursor},
|
|
||||||
open_on_tab = ${boolToString cfg.openTreeOnNewTab},
|
open_on_tab = ${boolToString cfg.openTreeOnNewTab},
|
||||||
open_on_setup = ${boolToString cfg.openOnSetup},
|
open_on_setup = ${boolToString cfg.openOnSetup},
|
||||||
open_on_setup_file = ${boolToString cfg.openOnSetup},
|
open_on_setup_file = ${boolToString cfg.openOnSetup},
|
||||||
|
@ -190,13 +154,10 @@ in {
|
||||||
enable = ${boolToString cfg.lspDiagnostics},
|
enable = ${boolToString cfg.lspDiagnostics},
|
||||||
},
|
},
|
||||||
view = {
|
view = {
|
||||||
adaptive_size = ${boolToString cfg.adaptiveSize},
|
|
||||||
width = ${toString cfg.treeWidth},
|
width = ${toString cfg.treeWidth},
|
||||||
side = ${"'" + cfg.treeSide + "'"},
|
side = ${"'" + cfg.treeSide + "'"},
|
||||||
},
|
},
|
||||||
renderer = {
|
renderer = {
|
||||||
highlight_git = ${boolToString cfg.highlightGit},
|
|
||||||
|
|
||||||
indent_markers = {
|
indent_markers = {
|
||||||
enable = ${boolToString cfg.indentMarkers},
|
enable = ${boolToString cfg.indentMarkers},
|
||||||
},
|
},
|
||||||
|
@ -219,9 +180,6 @@ in {
|
||||||
${builtins.concatStringsSep "\n" (builtins.map (s: "\"" + s + "\",") cfg.hideFiles)}
|
${builtins.concatStringsSep "\n" (builtins.map (s: "\"" + s + "\",") cfg.hideFiles)}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
filesystem_watchers = {
|
|
||||||
enable = ${boolToString cfg.fileSystemWatchers},
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue