Skip to content

Commit

Permalink
fix(lsp): error when opening a rust file that does not exist (#405)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcjkb committed May 23, 2024
1 parent ac4409b commit a73e861
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [4.23.4] - 2024-05-23

### Fixed

- LSP: Error when editing a rust file in a directory
that does not exist [(#404)](https://github.com/mrcjkb/rustaceanvim/issues/404).

## [4.23.3] - 2024-05-23

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion lua/rustaceanvim/cargo.lua
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function cargo.get_root_dir(file_name)
cargo_metadata = table.concat(d, '\n')
end,
stdout_buffered = true,
cwd = path,
cwd = compat.uv.fs_stat(path) and path or cargo_crate_dir or vim.fn.getcwd(),
})
if cm > 0 then
cm = vim.fn.jobwait({ cm })[1]
Expand Down

0 comments on commit a73e861

Please sign in to comment.