Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-view/src/expansion.rs')
| -rw-r--r-- | helix-view/src/expansion.rs | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/helix-view/src/expansion.rs b/helix-view/src/expansion.rs index 6a41ae43..b81166ed 100644 --- a/helix-view/src/expansion.rs +++ b/helix-view/src/expansion.rs @@ -33,10 +33,6 @@ pub enum Variable { BufferName, /// A string containing the line-ending of the currently focused document. LineEnding, - /// Curreng working directory - CurrentWorkingDirectory, - /// Nearest ancestor directory of the current working directory that contains `.git`, `.svn`, `jj` or `.helix` - WorkspaceDirectory, // The name of current buffers language as set in `languages.toml` Language, // Primary selection @@ -53,8 +49,6 @@ impl Variable { Self::CursorColumn, Self::BufferName, Self::LineEnding, - Self::CurrentWorkingDirectory, - Self::WorkspaceDirectory, Self::Language, Self::Selection, Self::SelectionLineStart, @@ -67,8 +61,6 @@ impl Variable { Self::CursorColumn => "cursor_column", Self::BufferName => "buffer_name", Self::LineEnding => "line_ending", - Self::CurrentWorkingDirectory => "current_working_directory", - Self::WorkspaceDirectory => "workspace_directory", Self::Language => "language", Self::Selection => "selection", Self::SelectionLineStart => "selection_line_start", @@ -82,8 +74,6 @@ impl Variable { "cursor_column" => Some(Self::CursorColumn), "buffer_name" => Some(Self::BufferName), "line_ending" => Some(Self::LineEnding), - "workspace_directory" => Some(Self::WorkspaceDirectory), - "current_working_directory" => Some(Self::CurrentWorkingDirectory), "language" => Some(Self::Language), "selection" => Some(Self::Selection), "selection_line_start" => Some(Self::SelectionLineStart), @@ -245,17 +235,6 @@ fn expand_variable(editor: &Editor, variable: Variable) -> Result<Cow<'static, s } } Variable::LineEnding => Ok(Cow::Borrowed(doc.line_ending.as_str())), - Variable::CurrentWorkingDirectory => Ok(std::borrow::Cow::Owned( - helix_stdx::env::current_working_dir() - .to_string_lossy() - .to_string(), - )), - Variable::WorkspaceDirectory => Ok(std::borrow::Cow::Owned( - helix_loader::find_workspace() - .0 - .to_string_lossy() - .to_string(), - )), Variable::Language => Ok(match doc.language_name() { Some(lang) => Cow::Owned(lang.to_owned()), None => Cow::Borrowed("text"), |