Skip to content

Commit a73e861

Browse files
authored
fix(lsp): error when opening a rust file that does not exist (#405)
1 parent ac4409b commit a73e861

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ All notable changes to this project will be documented in this file.
66
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
77
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
88

9+
## [4.23.4] - 2024-05-23
10+
11+
### Fixed
12+
13+
- LSP: Error when editing a rust file in a directory
14+
that does not exist [(#404)](https://github.com/mrcjkb/rustaceanvim/issues/404).
15+
916
## [4.23.3] - 2024-05-23
1017

1118
### Fixed

lua/rustaceanvim/cargo.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ function cargo.get_root_dir(file_name)
5656
cargo_metadata = table.concat(d, '\n')
5757
end,
5858
stdout_buffered = true,
59-
cwd = path,
59+
cwd = compat.uv.fs_stat(path) and path or cargo_crate_dir or vim.fn.getcwd(),
6060
})
6161
if cm > 0 then
6262
cm = vim.fn.jobwait({ cm })[1]

0 commit comments

Comments
 (0)