diff --git a/book/src/themes.md b/book/src/themes.md index 16f9dd686eb4..1d0ba151773d 100644 --- a/book/src/themes.md +++ b/book/src/themes.md @@ -305,7 +305,7 @@ These scopes are used for theming the editor interface: | `ui.text.focus` | The currently selected line in the picker | | `ui.text.inactive` | Same as `ui.text` but when the text is inactive (e.g. suggestions) | | `ui.text.info` | The key: command text in `ui.popup.info` boxes | -| `ui.text.directory` | Color of directories | +| `ui.text.directory` | Directory names in prompt completion | | `ui.virtual.ruler` | Ruler columns (see the [`editor.rulers` config][editor-section]) | | `ui.virtual.whitespace` | Visible whitespace characters | | `ui.virtual.indent-guide` | Vertical indent width guides | diff --git a/helix-term/src/ui/mod.rs b/helix-term/src/ui/mod.rs index 4b2d6ba06afd..6ee49fa57ddd 100644 --- a/helix-term/src/ui/mod.rs +++ b/helix-term/src/ui/mod.rs @@ -277,12 +277,12 @@ pub fn file_picker(root: PathBuf, config: &helix_view::editor::Config) -> FilePi } pub mod completers { + use super::Utf8PathBuf; use crate::ui::prompt::Completion; - use crate::ui::Utf8PathBuf; use helix_core::fuzzy::fuzzy_match; use helix_core::syntax::LanguageServerFeature; use helix_view::document::SCRATCH_BUFFER_NAME; - use helix_view::theme::{self}; + use helix_view::theme; use helix_view::{editor::Config, Editor}; use once_cell::sync::Lazy; use std::borrow::Cow; @@ -495,7 +495,7 @@ pub mod completers { return None; } - let is_dir = entry.file_type().map_or(false, |entry| entry.is_dir()); + let is_dir = entry.file_type().is_some_and(|entry| entry.is_dir()); let path = entry.path(); let mut path = if is_tilde {