pub fn get_relative_path_to_cwd(current_buffer: &Buffer) -> Option<PathBuf>Expand description
Retrieves the relative path of the given buffer from the current working directory.
Attempts to strip the current working directory prefix from the buffer’s absolute path. If the buffer path does not start with the cwd, returns the absolute path as-is.
§Errors
Errors (e.g., cannot get cwd or buffer name) are notified to Nvim but not propagated.