Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-view/src/editor.rs')
| -rw-r--r-- | helix-view/src/editor.rs | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs index 5cd2ae2c..76682920 100644 --- a/helix-view/src/editor.rs +++ b/helix-view/src/editor.rs @@ -221,7 +221,7 @@ impl Default for FilePickerConfig { } } -#[derive(Default, Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] #[serde(rename_all = "kebab-case", default, deny_unknown_fields)] pub struct FileExplorerConfig { /// IgnoreOptions @@ -229,22 +229,39 @@ pub struct FileExplorerConfig { /// Whether to hide hidden files in file explorer and global search results. Defaults to false. pub hidden: bool, /// Enables following symlinks. - /// Whether to follow symbolic links in file picker and file or directory completions. Defaults to true. + /// Whether to follow symbolic links in file picker and file or directory completions. Defaults to false. pub follow_symlinks: bool, - /// Enables reading ignore files from parent directories. Defaults to true. + /// Enables reading ignore files from parent directories. Defaults to false. pub parents: bool, /// Enables reading `.ignore` files. - /// Whether to hide files listed in .ignore in file picker and global search results. Defaults to true. + /// Whether to hide files listed in .ignore in file picker and global search results. Defaults to false. pub ignore: bool, /// Enables reading `.gitignore` files. - /// Whether to hide files listed in .gitignore in file picker and global search results. Defaults to true. + /// Whether to hide files listed in .gitignore in file picker and global search results. Defaults to false. pub git_ignore: bool, /// Enables reading global .gitignore, whose path is specified in git's config: `core.excludefile` option. - /// Whether to hide files listed in global .gitignore in file picker and global search results. Defaults to true. + /// Whether to hide files listed in global .gitignore in file picker and global search results. Defaults to false. pub git_global: bool, /// Enables reading `.git/info/exclude` files. - /// Whether to hide files listed in .git/info/exclude in file picker and global search results. Defaults to true. + /// Whether to hide files listed in .git/info/exclude in file picker and global search results. Defaults to false. pub git_exclude: bool, + /// Whether to flatten single-child directories in file explorer. Defaults to true. + pub flatten_dirs: bool, +} + +impl Default for FileExplorerConfig { + fn default() -> Self { + Self { + hidden: false, + follow_symlinks: false, + parents: false, + ignore: false, + git_ignore: false, + git_global: false, + git_exclude: false, + flatten_dirs: true, + } + } } fn serialize_alphabet<S>(alphabet: &[char], serializer: S) -> Result<S::Ok, S::Error> |