Releases: mrcjkb/rustaceanvim
4.11.0
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.
[4.11.0] - 2024-03-03
Added
- LSP: By default, don't auto-attach to buffers that aren't files [#268].
Fixed
- LSP: Bug preventing reload workspace on save Cargo.toml
when opening another Rust buffer [#270]. - LSP: Don't try to delete
RustLsp
command on client exit
if it doesn't exist, and fail silently.
[4.10.2] - 2024-03-01
Fixed
- LSP: Schedule Neovim API calls on
on_exit
[#267].
Thanks @tomtomjhj!
[4.10.1] - 2024-02-27
Fixed
- UI: Explicitly disable signcolumn for grouped code action
and hover action windows [#262].
[4.10.0] - 2024-02-23
Added
- LSP/Grouped code actions: Add
<ESC>
keymap to close buffer.
This is consistent with the behaviour of the hover actions buffer.
[4.9.0] - 2024-02-23
Added
- Nix:
codelldb
adapter package (without the vscode extension)
as a nixpkgs overlay and a flake output.
Reverted
- Don't run
ftplugin/rust.lua
more than once on the same
buffer.
This prevented the client from reattaching when running
:e
on a buffer [#250].
[4.8.0] - 2024-02-20
Added
- Neotest: Expose doctests in
:Neotest summary
window [#247].
Thanks @bltavares!
Fixed
- Testables: Run doctests when cargo-nextest is present [#246]
Thanks @bltavares! - Windows: Normalize file actions when comparing to root dir [#245].
Thanks @bltavares!
[4.7.5] - 2024-02-20
Fixed
- DAP: Use deep copies of dap configs.
- DAP: Bad config validation:
dap.configuration.env
should be
atable
, not astring
.
[4.7.4] - 2024-02-19
Fixed
- LSP: Support both top-level rust-analyzer object and object with
"rust-analyzer":
key when importing settings fromrust-analyzer.json
.
The fix introduced in version 4.6.0 had accidentally broken
backward compatibility. The new implementation is backward compatible again.
[4.7.3] - 2024-02-15
Fixed
- LSP: Error when running
reloadWorkspace
,
rebuildMacros
orworkspaceSymbol
from a non-rust buffer [#234]. - Internal: Don't pass client not found error to handler.
[4.7.2] - 2024-02-13
Revert
- DAP(
codelldb
): Redirectstdio
(stdout
) to a temp file.
[4.7.1] - 2024-02-12
Fixed
- LSP:
checkOnSave = false
not respected when clippy is installed
(introduced with clippy auto-detection in version4.6.0
).
[4.7.0] - 2024-02-11
Added
- Testables: Add
tools.crate_test_executor
option for running
crate test suites (--all-targets
). - Rustc: Do not require a main function,
and support the 2024 edition
viaunstable-options
.
Thanks @saying121!
Fixed
- Neotest: Nested modules + position updates when switching buffers [#223].
Thanks @jameshurst! - Testables: Support
neotest
executor when usingnextest
. - Testables: Support aliases for
test_executor
andcrate_test_executor
.
[4.6.0] - 2024-02-07
Added
- LSP: New
tools.enable_clippy
option (defaults totrue
).
Enable clippy lints on save if acargo-clippy
installation
is detected.
Fixed
- testables/neotest: Don't use nextest if disabled in the config.
- LSP: load project-local rust-analyzer.json configs into
server['rust-analyzer']
, instead of replacing theserver
config.
[4.5.2] - 2024-02-06
Fixed
- runnables/debuggables/testables:
cd
into directory with spaces [#212].
Fixed
[4.5.1] - 2024-02-03
Fixed
- LSP: Notify if an LSP request was made but no rust-analyzer client is attached.
- Neotest: Only the current buffer was queried for test positions.
[4.5.0] - 2024-02-02
Added
- Filtered workspace symbol searches with
:RustLsp[!] workspaceSymbol [onlyTypes?|allSymbols?] [query?]
.
Will include dependencies if called with a bang!
. - Neotest: Basic support for
require('neotest').run.run { suite = true }
.
This will run the current crate's test suite, if detected.
Note that positions are still only discovered for buffers with an attached
LSP client.
[4.4.0] - 2024-02-01
Added
- You can now register a
rustaceanvim.neotest
adapter with neotest.
It will query rust-analyzer for test positions and test commands in any
buffer to which the LSP client is attached.
If you do so,tools.test_executor
will default to a new'neotest'
executor, which will use neotest to runtestables
orrunnables
that are tests. - Support for
require('neotest').run.run { strategy = 'dap' }
.
This will use the same logic as:RustLsp debuggables
to set neotest's
DAP strategy. No extra configuration needed! :RustLsp testables
: Prettier selection options.
Fixes
- DAP(
codelldb
): Redirectstdio
(stdout
) to a temp file.
[4.3.0] - 2024-01-31
Changed
- LSP: Improved parsing of test result failure messages.
[4.2.1] - 2024-01-30
Fixed
- LSP: Only advertise
rust-analyzer.debugSingle
command capability
if nvim-dap is installed. - LSP:
nil
error if running:RustLsp! testables
and there is no
previous testable. - LSP: Update previous testables cache if executing a
rust-analyzer.runSingle
command that is a test.
[4.2.0] - 2024-01-30
Added
- Config: Separate
tools.executor
andtools.test_executor
options.
Thetest_executor
is used for test runnables (e.g.cargo test
). - LSP: New test executor,
'background'
that runs tests in the background
and provides diagnostics for failed tests when complete.
Used by default in Neovim >= 0.10. - LSP:
:RustLsp testables
command, which is equivalent
to:RustLsp runnables
, but filters the runnables for tests only,
Important
In Neovim < 0.10, 'background'
executor blocks the UI while running tests.
[4.1.0] - 2024-01-29
Added
:Rustc unpretty
command:
Userustc -Z unpretty=[mir|hir|...]
to inspect mir and other things,
and achieve an experience similar to Rust Playground.
(currently requires a nightly compiler).
Thanks saying121!- Config:
tools.rustc
arguments forrustc
.
Changed
- Improved command completions.
- Filter suggested subcommand arguments based on existing user input.
- When calling,
:RustLsp!
, show only subcommands that change
behaviour with a bang.
Fixed
- Command completions: Removed completions
forrunnables/debuggables last
.
[4.0.3] - 2024-01-28
Fixed
renderDiagnostic
: Window closes immediately ifauto_focus
is disabled [#193].explainError
/renderDiagnostic
: Fall back to first
detected diagnostic if none is found close to the cursor.
[4.0.2] - 2024-01-27
Fixed
- LSP (standalone): Use
bufnr
passed intolsp.start
function when
determining detached file name.
[4.0.1] - 2024-01-27
Fixed
- LSP: Fix resetting client state on
:RustAnalyzer stop
if only one client is attached.
Performance
- Only setup
vim.lsp.commands
for rust-analyzer on the first
initialization. - Don't run
ftplugin/rust.lua
more than once on the same
buffer.
[4.0.0] - 2024-01-25
BREAKING CHANGES
- To run the previous runnable/debuggable, you would call
:RustLsp runnables last
or:RustLsp debuggables last
.
These two functions now take optional arguments that you can pass to the executables.
The new way to run the previous runnable/debuggable is with a bang (!
).
e.g.:RustLsp! debuggables
.
In Lua, this isvim.cmd.RustLsp { 'debuggables', bang = true }
, and the same
for'runnables'
.
Added
- LSP: Option to fall back to
vim.ui.select
if there
are no code action groups when running:RustLsp codeAction
. - LSP/DAP: Allow overriding executable args with
:RustLsp runnables args[]
and:RustLsp debuggables args[]
.
Fixed
- LSP: Focus lost when secondary float opens on
:RustLsp codeAction
[#169].
[3.17.3] - 2024-01-25
Fixed
- DAP:
nil
safety in standalone files [#182].
[3.17.2] - 2024-01-22
Fixed
- LSP: Properly sanitize hover actions debug command [#179].
Thanks @Tired-Fox!
[3.17.1] - 2024-01-22
Fixed
- Spawn rust-analyzer in detached mode when no project root is found.
This adds support for standalone files without a Rust project.
[3.17.0] - 2024-01-20
Added
- Cache runnables and debuggables run with commands/code lenses.
[3.16.3] - 2024-01-20
Changed
- Performance (DAP): Use cached source map,
LLDB commands and library path. - DAP: Set
autoload_configurations
only for Neovim >= 0.10,
as compiling the debug build is not async in Neovim 0.9.
[3.16.2] - 2024-01-19
Fixed
- DAP:
nil
error when executingrust-analyzer.debugSingle
or:RustLsp debuggables last
commands (introduced in 3.16.0)....
4.10.2
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.
[4.10.2] - 2024-03-01
Fixed
- LSP: Schedule Neovim API calls on
on_exit
[#267].
Thanks @tomtomjhj!
[4.10.1] - 2024-02-27
Fixed
- UI: Explicitly disable signcolumn for grouped code action
and hover action windows [#262].
[4.10.0] - 2024-02-23
Added
- LSP/Grouped code actions: Add
<ESC>
keymap to close buffer.
This is consistent with the behaviour of the hover actions buffer.
[4.9.0] - 2024-02-23
Added
- Nix:
codelldb
adapter package (without the vscode extension)
as a nixpkgs overlay and a flake output.
Reverted
- Don't run
ftplugin/rust.lua
more than once on the same
buffer.
This prevented the client from reattaching when running
:e
on a buffer [#250].
[4.8.0] - 2024-02-20
Added
- Neotest: Expose doctests in
:Neotest summary
window [#247].
Thanks @bltavares!
Fixed
- Testables: Run doctests when cargo-nextest is present [#246]
Thanks @bltavares! - Windows: Normalize file actions when comparing to root dir [#245].
Thanks @bltavares!
[4.7.5] - 2024-02-20
Fixed
- DAP: Use deep copies of dap configs.
- DAP: Bad config validation:
dap.configuration.env
should be
atable
, not astring
.
[4.7.4] - 2024-02-19
Fixed
- LSP: Support both top-level rust-analyzer object and object with
"rust-analyzer":
key when importing settings fromrust-analyzer.json
.
The fix introduced in version 4.6.0 had accidentally broken
backward compatibility. The new implementation is backward compatible again.
[4.7.3] - 2024-02-15
Fixed
- LSP: Error when running
reloadWorkspace
,
rebuildMacros
orworkspaceSymbol
from a non-rust buffer [#234]. - Internal: Don't pass client not found error to handler.
[4.7.2] - 2024-02-13
Revert
- DAP(
codelldb
): Redirectstdio
(stdout
) to a temp file.
[4.7.1] - 2024-02-12
Fixed
- LSP:
checkOnSave = false
not respected when clippy is installed
(introduced with clippy auto-detection in version4.6.0
).
[4.7.0] - 2024-02-11
Added
- Testables: Add
tools.crate_test_executor
option for running
crate test suites (--all-targets
). - Rustc: Do not require a main function,
and support the 2024 edition
viaunstable-options
.
Thanks @saying121!
Fixed
- Neotest: Nested modules + position updates when switching buffers [#223].
Thanks @jameshurst! - Testables: Support
neotest
executor when usingnextest
. - Testables: Support aliases for
test_executor
andcrate_test_executor
.
[4.6.0] - 2024-02-07
Added
- LSP: New
tools.enable_clippy
option (defaults totrue
).
Enable clippy lints on save if acargo-clippy
installation
is detected.
Fixed
- testables/neotest: Don't use nextest if disabled in the config.
- LSP: load project-local rust-analyzer.json configs into
server['rust-analyzer']
, instead of replacing theserver
config.
[4.5.2] - 2024-02-06
Fixed
- runnables/debuggables/testables:
cd
into directory with spaces [#212].
Fixed
[4.5.1] - 2024-02-03
Fixed
- LSP: Notify if an LSP request was made but no rust-analyzer client is attached.
- Neotest: Only the current buffer was queried for test positions.
[4.5.0] - 2024-02-02
Added
- Filtered workspace symbol searches with
:RustLsp[!] workspaceSymbol [onlyTypes?|allSymbols?] [query?]
.
Will include dependencies if called with a bang!
. - Neotest: Basic support for
require('neotest').run.run { suite = true }
.
This will run the current crate's test suite, if detected.
Note that positions are still only discovered for buffers with an attached
LSP client.
[4.4.0] - 2024-02-01
Added
- You can now register a
rustaceanvim.neotest
adapter with neotest.
It will query rust-analyzer for test positions and test commands in any
buffer to which the LSP client is attached.
If you do so,tools.test_executor
will default to a new'neotest'
executor, which will use neotest to runtestables
orrunnables
that are tests. - Support for
require('neotest').run.run { strategy = 'dap' }
.
This will use the same logic as:RustLsp debuggables
to set neotest's
DAP strategy. No extra configuration needed! :RustLsp testables
: Prettier selection options.
Fixes
- DAP(
codelldb
): Redirectstdio
(stdout
) to a temp file.
[4.3.0] - 2024-01-31
Changed
- LSP: Improved parsing of test result failure messages.
[4.2.1] - 2024-01-30
Fixed
- LSP: Only advertise
rust-analyzer.debugSingle
command capability
if nvim-dap is installed. - LSP:
nil
error if running:RustLsp! testables
and there is no
previous testable. - LSP: Update previous testables cache if executing a
rust-analyzer.runSingle
command that is a test.
[4.2.0] - 2024-01-30
Added
- Config: Separate
tools.executor
andtools.test_executor
options.
Thetest_executor
is used for test runnables (e.g.cargo test
). - LSP: New test executor,
'background'
that runs tests in the background
and provides diagnostics for failed tests when complete.
Used by default in Neovim >= 0.10. - LSP:
:RustLsp testables
command, which is equivalent
to:RustLsp runnables
, but filters the runnables for tests only,
Important
In Neovim < 0.10, 'background'
executor blocks the UI while running tests.
[4.1.0] - 2024-01-29
Added
:Rustc unpretty
command:
Userustc -Z unpretty=[mir|hir|...]
to inspect mir and other things,
and achieve an experience similar to Rust Playground.
(currently requires a nightly compiler).
Thanks saying121!- Config:
tools.rustc
arguments forrustc
.
Changed
- Improved command completions.
- Filter suggested subcommand arguments based on existing user input.
- When calling,
:RustLsp!
, show only subcommands that change
behaviour with a bang.
Fixed
- Command completions: Removed completions
forrunnables/debuggables last
.
[4.0.3] - 2024-01-28
Fixed
renderDiagnostic
: Window closes immediately ifauto_focus
is disabled [#193].explainError
/renderDiagnostic
: Fall back to first
detected diagnostic if none is found close to the cursor.
[4.0.2] - 2024-01-27
Fixed
- LSP (standalone): Use
bufnr
passed intolsp.start
function when
determining detached file name.
[4.0.1] - 2024-01-27
Fixed
- LSP: Fix resetting client state on
:RustAnalyzer stop
if only one client is attached.
Performance
- Only setup
vim.lsp.commands
for rust-analyzer on the first
initialization. - Don't run
ftplugin/rust.lua
more than once on the same
buffer.
[4.0.0] - 2024-01-25
BREAKING CHANGES
- To run the previous runnable/debuggable, you would call
:RustLsp runnables last
or:RustLsp debuggables last
.
These two functions now take optional arguments that you can pass to the executables.
The new way to run the previous runnable/debuggable is with a bang (!
).
e.g.:RustLsp! debuggables
.
In Lua, this isvim.cmd.RustLsp { 'debuggables', bang = true }
, and the same
for'runnables'
.
Added
- LSP: Option to fall back to
vim.ui.select
if there
are no code action groups when running:RustLsp codeAction
. - LSP/DAP: Allow overriding executable args with
:RustLsp runnables args[]
and:RustLsp debuggables args[]
.
Fixed
- LSP: Focus lost when secondary float opens on
:RustLsp codeAction
[#169].
[3.17.3] - 2024-01-25
Fixed
- DAP:
nil
safety in standalone files [#182].
[3.17.2] - 2024-01-22
Fixed
- LSP: Properly sanitize hover actions debug command [#179].
Thanks @Tired-Fox!
[3.17.1] - 2024-01-22
Fixed
- Spawn rust-analyzer in detached mode when no project root is found.
This adds support for standalone files without a Rust project.
[3.17.0] - 2024-01-20
Added
- Cache runnables and debuggables run with commands/code lenses.
[3.16.3] - 2024-01-20
Changed
- Performance (DAP): Use cached source map,
LLDB commands and library path. - DAP: Set
autoload_configurations
only for Neovim >= 0.10,
as compiling the debug build is not async in Neovim 0.9.
[3.16.2] - 2024-01-19
Fixed
- DAP:
nil
error when executingrust-analyzer.debugSingle
or:RustLsp debuggables last
commands (introduced in 3.16.0).
[3.16.1] - 2024-01-17
Fixed
- DAP: Improve reliability of loading Rust debug configurations on LSP attach.
- DAP: Assign
lldb
andcodelldb
configurations found inlaunch.json
todap.configurations.rust
.
[3.16.0] - 2024-01-15
Added
- DAP: Better
nvim-dap
integration:
Automatically try to load Rust debug configurations on LSP attach.
This lets you userequire('dap').continue()
instead of `:Rus...
4.10.1
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.
[4.10.1] - 2024-02-27
Fixed
- UI: Explicitly disable signcolumn for grouped code action
and hover action windows [#262].
[4.10.0] - 2024-02-23
Added
- LSP/Grouped code actions: Add
<ESC>
keymap to close buffer.
This is consistent with the behaviour of the hover actions buffer.
[4.9.0] - 2024-02-23
Added
- Nix:
codelldb
adapter package (without the vscode extension)
as a nixpkgs overlay and a flake output.
Reverted
- Don't run
ftplugin/rust.lua
more than once on the same
buffer.
This prevented the client from reattaching when running
:e
on a buffer [#250].
[4.8.0] - 2024-02-20
Added
- Neotest: Expose doctests in
:Neotest summary
window [#247].
Thanks @bltavares!
Fixed
- Testables: Run doctests when cargo-nextest is present [#246]
Thanks @bltavares! - Windows: Normalize file actions when comparing to root dir [#245].
Thanks @bltavares!
[4.7.5] - 2024-02-20
Fixed
- DAP: Use deep copies of dap configs.
- DAP: Bad config validation:
dap.configuration.env
should be
atable
, not astring
.
[4.7.4] - 2024-02-19
Fixed
- LSP: Support both top-level rust-analyzer object and object with
"rust-analyzer":
key when importing settings fromrust-analyzer.json
.
The fix introduced in version 4.6.0 had accidentally broken
backward compatibility. The new implementation is backward compatible again.
[4.7.3] - 2024-02-15
Fixed
- LSP: Error when running
reloadWorkspace
,
rebuildMacros
orworkspaceSymbol
from a non-rust buffer [#234]. - Internal: Don't pass client not found error to handler.
[4.7.2] - 2024-02-13
Revert
- DAP(
codelldb
): Redirectstdio
(stdout
) to a temp file.
[4.7.1] - 2024-02-12
Fixed
- LSP:
checkOnSave = false
not respected when clippy is installed
(introduced with clippy auto-detection in version4.6.0
).
[4.7.0] - 2024-02-11
Added
- Testables: Add
tools.crate_test_executor
option for running
crate test suites (--all-targets
). - Rustc: Do not require a main function,
and support the 2024 edition
viaunstable-options
.
Thanks @saying121!
Fixed
- Neotest: Nested modules + position updates when switching buffers [#223].
Thanks @jameshurst! - Testables: Support
neotest
executor when usingnextest
. - Testables: Support aliases for
test_executor
andcrate_test_executor
.
[4.6.0] - 2024-02-07
Added
- LSP: New
tools.enable_clippy
option (defaults totrue
).
Enable clippy lints on save if acargo-clippy
installation
is detected.
Fixed
- testables/neotest: Don't use nextest if disabled in the config.
- LSP: load project-local rust-analyzer.json configs into
server['rust-analyzer']
, instead of replacing theserver
config.
[4.5.2] - 2024-02-06
Fixed
- runnables/debuggables/testables:
cd
into directory with spaces [#212].
Fixed
[4.5.1] - 2024-02-03
Fixed
- LSP: Notify if an LSP request was made but no rust-analyzer client is attached.
- Neotest: Only the current buffer was queried for test positions.
[4.5.0] - 2024-02-02
Added
- Filtered workspace symbol searches with
:RustLsp[!] workspaceSymbol [onlyTypes?|allSymbols?] [query?]
.
Will include dependencies if called with a bang!
. - Neotest: Basic support for
require('neotest').run.run { suite = true }
.
This will run the current crate's test suite, if detected.
Note that positions are still only discovered for buffers with an attached
LSP client.
[4.4.0] - 2024-02-01
Added
- You can now register a
rustaceanvim.neotest
adapter with neotest.
It will query rust-analyzer for test positions and test commands in any
buffer to which the LSP client is attached.
If you do so,tools.test_executor
will default to a new'neotest'
executor, which will use neotest to runtestables
orrunnables
that are tests. - Support for
require('neotest').run.run { strategy = 'dap' }
.
This will use the same logic as:RustLsp debuggables
to set neotest's
DAP strategy. No extra configuration needed! :RustLsp testables
: Prettier selection options.
Fixes
- DAP(
codelldb
): Redirectstdio
(stdout
) to a temp file.
[4.3.0] - 2024-01-31
Changed
- LSP: Improved parsing of test result failure messages.
[4.2.1] - 2024-01-30
Fixed
- LSP: Only advertise
rust-analyzer.debugSingle
command capability
if nvim-dap is installed. - LSP:
nil
error if running:RustLsp! testables
and there is no
previous testable. - LSP: Update previous testables cache if executing a
rust-analyzer.runSingle
command that is a test.
[4.2.0] - 2024-01-30
Added
- Config: Separate
tools.executor
andtools.test_executor
options.
Thetest_executor
is used for test runnables (e.g.cargo test
). - LSP: New test executor,
'background'
that runs tests in the background
and provides diagnostics for failed tests when complete.
Used by default in Neovim >= 0.10. - LSP:
:RustLsp testables
command, which is equivalent
to:RustLsp runnables
, but filters the runnables for tests only,
Important
In Neovim < 0.10, 'background'
executor blocks the UI while running tests.
[4.1.0] - 2024-01-29
Added
:Rustc unpretty
command:
Userustc -Z unpretty=[mir|hir|...]
to inspect mir and other things,
and achieve an experience similar to Rust Playground.
(currently requires a nightly compiler).
Thanks saying121!- Config:
tools.rustc
arguments forrustc
.
Changed
- Improved command completions.
- Filter suggested subcommand arguments based on existing user input.
- When calling,
:RustLsp!
, show only subcommands that change
behaviour with a bang.
Fixed
- Command completions: Removed completions
forrunnables/debuggables last
.
[4.0.3] - 2024-01-28
Fixed
renderDiagnostic
: Window closes immediately ifauto_focus
is disabled [#193].explainError
/renderDiagnostic
: Fall back to first
detected diagnostic if none is found close to the cursor.
[4.0.2] - 2024-01-27
Fixed
- LSP (standalone): Use
bufnr
passed intolsp.start
function when
determining detached file name.
[4.0.1] - 2024-01-27
Fixed
- LSP: Fix resetting client state on
:RustAnalyzer stop
if only one client is attached.
Performance
- Only setup
vim.lsp.commands
for rust-analyzer on the first
initialization. - Don't run
ftplugin/rust.lua
more than once on the same
buffer.
[4.0.0] - 2024-01-25
BREAKING CHANGES
- To run the previous runnable/debuggable, you would call
:RustLsp runnables last
or:RustLsp debuggables last
.
These two functions now take optional arguments that you can pass to the executables.
The new way to run the previous runnable/debuggable is with a bang (!
).
e.g.:RustLsp! debuggables
.
In Lua, this isvim.cmd.RustLsp { 'debuggables', bang = true }
, and the same
for'runnables'
.
Added
- LSP: Option to fall back to
vim.ui.select
if there
are no code action groups when running:RustLsp codeAction
. - LSP/DAP: Allow overriding executable args with
:RustLsp runnables args[]
and:RustLsp debuggables args[]
.
Fixed
- LSP: Focus lost when secondary float opens on
:RustLsp codeAction
[#169].
[3.17.3] - 2024-01-25
Fixed
- DAP:
nil
safety in standalone files [#182].
[3.17.2] - 2024-01-22
Fixed
- LSP: Properly sanitize hover actions debug command [#179].
Thanks @Tired-Fox!
[3.17.1] - 2024-01-22
Fixed
- Spawn rust-analyzer in detached mode when no project root is found.
This adds support for standalone files without a Rust project.
[3.17.0] - 2024-01-20
Added
- Cache runnables and debuggables run with commands/code lenses.
[3.16.3] - 2024-01-20
Changed
- Performance (DAP): Use cached source map,
LLDB commands and library path. - DAP: Set
autoload_configurations
only for Neovim >= 0.10,
as compiling the debug build is not async in Neovim 0.9.
[3.16.2] - 2024-01-19
Fixed
- DAP:
nil
error when executingrust-analyzer.debugSingle
or:RustLsp debuggables last
commands (introduced in 3.16.0).
[3.16.1] - 2024-01-17
Fixed
- DAP: Improve reliability of loading Rust debug configurations on LSP attach.
- DAP: Assign
lldb
andcodelldb
configurations found inlaunch.json
todap.configurations.rust
.
[3.16.0] - 2024-01-15
Added
- DAP: Better
nvim-dap
integration:
Automatically try to load Rust debug configurations on LSP attach.
This lets you userequire('dap').continue()
instead of:RustLsp debuggables
,
once the configurations have been loaded.
Can be disabled by settingvim.g.rustaceanvim.dap.autoload_configurations = false
.
Fixed
- LSP: If inlay hints are enabled ...
4.10.0
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.
[4.10.0] - 2024-02-23
Added
- LSP/Grouped code actions: Add
<ESC>
keymap to close buffer.
This is consistent with the behaviour of the hover actions buffer.
[4.9.0] - 2024-02-23
Added
- Nix:
codelldb
adapter package (without the vscode extension)
as a nixpkgs overlay and a flake output.
Reverted
- Don't run
ftplugin/rust.lua
more than once on the same
buffer.
This prevented the client from reattaching when running
:e
on a buffer [#250].
[4.8.0] - 2024-02-20
Added
- Neotest: Expose doctests in
:Neotest summary
window [#247].
Thanks @bltavares!
Fixed
- Testables: Run doctests when cargo-nextest is present [#246]
Thanks @bltavares! - Windows: Normalize file actions when comparing to root dir [#245].
Thanks @bltavares!
[4.7.5] - 2024-02-20
Fixed
- DAP: Use deep copies of dap configs.
- DAP: Bad config validation:
dap.configuration.env
should be
atable
, not astring
.
[4.7.4] - 2024-02-19
Fixed
- LSP: Support both top-level rust-analyzer object and object with
"rust-analyzer":
key when importing settings fromrust-analyzer.json
.
The fix introduced in version 4.6.0 had accidentally broken
backward compatibility. The new implementation is backward compatible again.
[4.7.3] - 2024-02-15
Fixed
- LSP: Error when running
reloadWorkspace
,
rebuildMacros
orworkspaceSymbol
from a non-rust buffer [#234]. - Internal: Don't pass client not found error to handler.
[4.7.2] - 2024-02-13
Revert
- DAP(
codelldb
): Redirectstdio
(stdout
) to a temp file.
[4.7.1] - 2024-02-12
Fixed
- LSP:
checkOnSave = false
not respected when clippy is installed
(introduced with clippy auto-detection in version4.6.0
).
[4.7.0] - 2024-02-11
Added
- Testables: Add
tools.crate_test_executor
option for running
crate test suites (--all-targets
). - Rustc: Do not require a main function,
and support the 2024 edition
viaunstable-options
.
Thanks @saying121!
Fixed
- Neotest: Nested modules + position updates when switching buffers [#223].
Thanks @jameshurst! - Testables: Support
neotest
executor when usingnextest
. - Testables: Support aliases for
test_executor
andcrate_test_executor
.
[4.6.0] - 2024-02-07
Added
- LSP: New
tools.enable_clippy
option (defaults totrue
).
Enable clippy lints on save if acargo-clippy
installation
is detected.
Fixed
- testables/neotest: Don't use nextest if disabled in the config.
- LSP: load project-local rust-analyzer.json configs into
server['rust-analyzer']
, instead of replacing theserver
config.
[4.5.2] - 2024-02-06
Fixed
- runnables/debuggables/testables:
cd
into directory with spaces [#212].
Fixed
[4.5.1] - 2024-02-03
Fixed
- LSP: Notify if an LSP request was made but no rust-analyzer client is attached.
- Neotest: Only the current buffer was queried for test positions.
[4.5.0] - 2024-02-02
Added
- Filtered workspace symbol searches with
:RustLsp[!] workspaceSymbol [onlyTypes?|allSymbols?] [query?]
.
Will include dependencies if called with a bang!
. - Neotest: Basic support for
require('neotest').run.run { suite = true }
.
This will run the current crate's test suite, if detected.
Note that positions are still only discovered for buffers with an attached
LSP client.
[4.4.0] - 2024-02-01
Added
- You can now register a
rustaceanvim.neotest
adapter with neotest.
It will query rust-analyzer for test positions and test commands in any
buffer to which the LSP client is attached.
If you do so,tools.test_executor
will default to a new'neotest'
executor, which will use neotest to runtestables
orrunnables
that are tests. - Support for
require('neotest').run.run { strategy = 'dap' }
.
This will use the same logic as:RustLsp debuggables
to set neotest's
DAP strategy. No extra configuration needed! :RustLsp testables
: Prettier selection options.
Fixes
- DAP(
codelldb
): Redirectstdio
(stdout
) to a temp file.
[4.3.0] - 2024-01-31
Changed
- LSP: Improved parsing of test result failure messages.
[4.2.1] - 2024-01-30
Fixed
- LSP: Only advertise
rust-analyzer.debugSingle
command capability
if nvim-dap is installed. - LSP:
nil
error if running:RustLsp! testables
and there is no
previous testable. - LSP: Update previous testables cache if executing a
rust-analyzer.runSingle
command that is a test.
[4.2.0] - 2024-01-30
Added
- Config: Separate
tools.executor
andtools.test_executor
options.
Thetest_executor
is used for test runnables (e.g.cargo test
). - LSP: New test executor,
'background'
that runs tests in the background
and provides diagnostics for failed tests when complete.
Used by default in Neovim >= 0.10. - LSP:
:RustLsp testables
command, which is equivalent
to:RustLsp runnables
, but filters the runnables for tests only,
Important
In Neovim < 0.10, 'background'
executor blocks the UI while running tests.
[4.1.0] - 2024-01-29
Added
:Rustc unpretty
command:
Userustc -Z unpretty=[mir|hir|...]
to inspect mir and other things,
and achieve an experience similar to Rust Playground.
(currently requires a nightly compiler).
Thanks saying121!- Config:
tools.rustc
arguments forrustc
.
Changed
- Improved command completions.
- Filter suggested subcommand arguments based on existing user input.
- When calling,
:RustLsp!
, show only subcommands that change
behaviour with a bang.
Fixed
- Command completions: Removed completions
forrunnables/debuggables last
.
[4.0.3] - 2024-01-28
Fixed
renderDiagnostic
: Window closes immediately ifauto_focus
is disabled [#193].explainError
/renderDiagnostic
: Fall back to first
detected diagnostic if none is found close to the cursor.
[4.0.2] - 2024-01-27
Fixed
- LSP (standalone): Use
bufnr
passed intolsp.start
function when
determining detached file name.
[4.0.1] - 2024-01-27
Fixed
- LSP: Fix resetting client state on
:RustAnalyzer stop
if only one client is attached.
Performance
- Only setup
vim.lsp.commands
for rust-analyzer on the first
initialization. - Don't run
ftplugin/rust.lua
more than once on the same
buffer.
[4.0.0] - 2024-01-25
BREAKING CHANGES
- To run the previous runnable/debuggable, you would call
:RustLsp runnables last
or:RustLsp debuggables last
.
These two functions now take optional arguments that you can pass to the executables.
The new way to run the previous runnable/debuggable is with a bang (!
).
e.g.:RustLsp! debuggables
.
In Lua, this isvim.cmd.RustLsp { 'debuggables', bang = true }
, and the same
for'runnables'
.
Added
- LSP: Option to fall back to
vim.ui.select
if there
are no code action groups when running:RustLsp codeAction
. - LSP/DAP: Allow overriding executable args with
:RustLsp runnables args[]
and:RustLsp debuggables args[]
.
Fixed
- LSP: Focus lost when secondary float opens on
:RustLsp codeAction
[#169].
[3.17.3] - 2024-01-25
Fixed
- DAP:
nil
safety in standalone files [#182].
[3.17.2] - 2024-01-22
Fixed
- LSP: Properly sanitize hover actions debug command [#179].
Thanks @Tired-Fox!
[3.17.1] - 2024-01-22
Fixed
- Spawn rust-analyzer in detached mode when no project root is found.
This adds support for standalone files without a Rust project.
[3.17.0] - 2024-01-20
Added
- Cache runnables and debuggables run with commands/code lenses.
[3.16.3] - 2024-01-20
Changed
- Performance (DAP): Use cached source map,
LLDB commands and library path. - DAP: Set
autoload_configurations
only for Neovim >= 0.10,
as compiling the debug build is not async in Neovim 0.9.
[3.16.2] - 2024-01-19
Fixed
- DAP:
nil
error when executingrust-analyzer.debugSingle
or:RustLsp debuggables last
commands (introduced in 3.16.0).
[3.16.1] - 2024-01-17
Fixed
- DAP: Improve reliability of loading Rust debug configurations on LSP attach.
- DAP: Assign
lldb
andcodelldb
configurations found inlaunch.json
todap.configurations.rust
.
[3.16.0] - 2024-01-15
Added
- DAP: Better
nvim-dap
integration:
Automatically try to load Rust debug configurations on LSP attach.
This lets you userequire('dap').continue()
instead of:RustLsp debuggables
,
once the configurations have been loa...
4.9.0
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.
[4.9.0] - 2024-02-23
Added
- Nix:
codelldb
adapter package (without the vscode extension)
as a nixpkgs overlay and a flake output.
Reverted
- Don't run
ftplugin/rust.lua
more than once on the same
buffer.
This prevented the client from reattaching when running
:e
on a buffer [#250].
[4.8.0] - 2024-02-20
Added
- Neotest: Expose doctests in
:Neotest summary
window [#247].
Thanks @bltavares!
Fixed
- Testables: Run doctests when cargo-nextest is present [#246]
Thanks @bltavares! - Windows: Normalize file actions when comparing to root dir [#245].
Thanks @bltavares!
[4.7.5] - 2024-02-20
Fixed
- DAP: Use deep copies of dap configs.
- DAP: Bad config validation:
dap.configuration.env
should be
atable
, not astring
.
[4.7.4] - 2024-02-19
Fixed
- LSP: Support both top-level rust-analyzer object and object with
"rust-analyzer":
key when importing settings fromrust-analyzer.json
.
The fix introduced in version 4.6.0 had accidentally broken
backward compatibility. The new implementation is backward compatible again.
[4.7.3] - 2024-02-15
Fixed
- LSP: Error when running
reloadWorkspace
,
rebuildMacros
orworkspaceSymbol
from a non-rust buffer [#234]. - Internal: Don't pass client not found error to handler.
[4.7.2] - 2024-02-13
Revert
- DAP(
codelldb
): Redirectstdio
(stdout
) to a temp file.
[4.7.1] - 2024-02-12
Fixed
- LSP:
checkOnSave = false
not respected when clippy is installed
(introduced with clippy auto-detection in version4.6.0
).
[4.7.0] - 2024-02-11
Added
- Testables: Add
tools.crate_test_executor
option for running
crate test suites (--all-targets
). - Rustc: Do not require a main function,
and support the 2024 edition
viaunstable-options
.
Thanks @saying121!
Fixed
- Neotest: Nested modules + position updates when switching buffers [#223].
Thanks @jameshurst! - Testables: Support
neotest
executor when usingnextest
. - Testables: Support aliases for
test_executor
andcrate_test_executor
.
[4.6.0] - 2024-02-07
Added
- LSP: New
tools.enable_clippy
option (defaults totrue
).
Enable clippy lints on save if acargo-clippy
installation
is detected.
Fixed
- testables/neotest: Don't use nextest if disabled in the config.
- LSP: load project-local rust-analyzer.json configs into
server['rust-analyzer']
, instead of replacing theserver
config.
[4.5.2] - 2024-02-06
Fixed
- runnables/debuggables/testables:
cd
into directory with spaces [#212].
Fixed
[4.5.1] - 2024-02-03
Fixed
- LSP: Notify if an LSP request was made but no rust-analyzer client is attached.
- Neotest: Only the current buffer was queried for test positions.
[4.5.0] - 2024-02-02
Added
- Filtered workspace symbol searches with
:RustLsp[!] workspaceSymbol [onlyTypes?|allSymbols?] [query?]
.
Will include dependencies if called with a bang!
. - Neotest: Basic support for
require('neotest').run.run { suite = true }
.
This will run the current crate's test suite, if detected.
Note that positions are still only discovered for buffers with an attached
LSP client.
[4.4.0] - 2024-02-01
Added
- You can now register a
rustaceanvim.neotest
adapter with neotest.
It will query rust-analyzer for test positions and test commands in any
buffer to which the LSP client is attached.
If you do so,tools.test_executor
will default to a new'neotest'
executor, which will use neotest to runtestables
orrunnables
that are tests. - Support for
require('neotest').run.run { strategy = 'dap' }
.
This will use the same logic as:RustLsp debuggables
to set neotest's
DAP strategy. No extra configuration needed! :RustLsp testables
: Prettier selection options.
Fixes
- DAP(
codelldb
): Redirectstdio
(stdout
) to a temp file.
[4.3.0] - 2024-01-31
Changed
- LSP: Improved parsing of test result failure messages.
[4.2.1] - 2024-01-30
Fixed
- LSP: Only advertise
rust-analyzer.debugSingle
command capability
if nvim-dap is installed. - LSP:
nil
error if running:RustLsp! testables
and there is no
previous testable. - LSP: Update previous testables cache if executing a
rust-analyzer.runSingle
command that is a test.
[4.2.0] - 2024-01-30
Added
- Config: Separate
tools.executor
andtools.test_executor
options.
Thetest_executor
is used for test runnables (e.g.cargo test
). - LSP: New test executor,
'background'
that runs tests in the background
and provides diagnostics for failed tests when complete.
Used by default in Neovim >= 0.10. - LSP:
:RustLsp testables
command, which is equivalent
to:RustLsp runnables
, but filters the runnables for tests only,
Important
In Neovim < 0.10, 'background'
executor blocks the UI while running tests.
[4.1.0] - 2024-01-29
Added
:Rustc unpretty
command:
Userustc -Z unpretty=[mir|hir|...]
to inspect mir and other things,
and achieve an experience similar to Rust Playground.
(currently requires a nightly compiler).
Thanks saying121!- Config:
tools.rustc
arguments forrustc
.
Changed
- Improved command completions.
- Filter suggested subcommand arguments based on existing user input.
- When calling,
:RustLsp!
, show only subcommands that change
behaviour with a bang.
Fixed
- Command completions: Removed completions
forrunnables/debuggables last
.
[4.0.3] - 2024-01-28
Fixed
renderDiagnostic
: Window closes immediately ifauto_focus
is disabled [#193].explainError
/renderDiagnostic
: Fall back to first
detected diagnostic if none is found close to the cursor.
[4.0.2] - 2024-01-27
Fixed
- LSP (standalone): Use
bufnr
passed intolsp.start
function when
determining detached file name.
[4.0.1] - 2024-01-27
Fixed
- LSP: Fix resetting client state on
:RustAnalyzer stop
if only one client is attached.
Performance
- Only setup
vim.lsp.commands
for rust-analyzer on the first
initialization. - Don't run
ftplugin/rust.lua
more than once on the same
buffer.
[4.0.0] - 2024-01-25
BREAKING CHANGES
- To run the previous runnable/debuggable, you would call
:RustLsp runnables last
or:RustLsp debuggables last
.
These two functions now take optional arguments that you can pass to the executables.
The new way to run the previous runnable/debuggable is with a bang (!
).
e.g.:RustLsp! debuggables
.
In Lua, this isvim.cmd.RustLsp { 'debuggables', bang = true }
, and the same
for'runnables'
.
Added
- LSP: Option to fall back to
vim.ui.select
if there
are no code action groups when running:RustLsp codeAction
. - LSP/DAP: Allow overriding executable args with
:RustLsp runnables args[]
and:RustLsp debuggables args[]
.
Fixed
- LSP: Focus lost when secondary float opens on
:RustLsp codeAction
[#169].
[3.17.3] - 2024-01-25
Fixed
- DAP:
nil
safety in standalone files [#182].
[3.17.2] - 2024-01-22
Fixed
- LSP: Properly sanitize hover actions debug command [#179].
Thanks @Tired-Fox!
[3.17.1] - 2024-01-22
Fixed
- Spawn rust-analyzer in detached mode when no project root is found.
This adds support for standalone files without a Rust project.
[3.17.0] - 2024-01-20
Added
- Cache runnables and debuggables run with commands/code lenses.
[3.16.3] - 2024-01-20
Changed
- Performance (DAP): Use cached source map,
LLDB commands and library path. - DAP: Set
autoload_configurations
only for Neovim >= 0.10,
as compiling the debug build is not async in Neovim 0.9.
[3.16.2] - 2024-01-19
Fixed
- DAP:
nil
error when executingrust-analyzer.debugSingle
or:RustLsp debuggables last
commands (introduced in 3.16.0).
[3.16.1] - 2024-01-17
Fixed
- DAP: Improve reliability of loading Rust debug configurations on LSP attach.
- DAP: Assign
lldb
andcodelldb
configurations found inlaunch.json
todap.configurations.rust
.
[3.16.0] - 2024-01-15
Added
- DAP: Better
nvim-dap
integration:
Automatically try to load Rust debug configurations on LSP attach.
This lets you userequire('dap').continue()
instead of:RustLsp debuggables
,
once the configurations have been loaded.
Can be disabled by settingvim.g.rustaceanvim.dap.autoload_configurations = false
.
Fixed
- LSP: If inlay hints are enabled for a buffer, force Neovim
to redraw them when rust-analyzer has fully initialized.
This is a workaround for neovim/26511. - LSP: On client stop, reset the
experimental/serverStatus
handler's
internal state for the respective client, so that the handler can be
rerun on restart. - LSP/Windows: Norm...
4.8.0
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.
[4.8.0] - 2024-02-20
Added
- Neotest: Expose doctests in
:Neotest summary
window [#247].
Thanks @bltavares!
Fixed
- Testables: Run doctests when cargo-nextest is present [#246]
Thanks @bltavares! - Windows: Normalize file actions when comparing to root dir [#245].
Thanks @bltavares!
[4.7.5] - 2024-02-20
Fixed
- DAP: Use deep copies of dap configs.
- DAP: Bad config validation:
dap.configuration.env
should be
atable
, not astring
.
[4.7.4] - 2024-02-19
Fixed
- LSP: Support both top-level rust-analyzer object and object with
"rust-analyzer":
key when importing settings fromrust-analyzer.json
.
The fix introduced in version 4.6.0 had accidentally broken
backward compatibility. The new implementation is backward compatible again.
[4.7.3] - 2024-02-15
Fixed
- LSP: Error when running
reloadWorkspace
,
rebuildMacros
orworkspaceSymbol
from a non-rust buffer [#234]. - Internal: Don't pass client not found error to handler.
[4.7.2] - 2024-02-13
Revert
- DAP(
codelldb
): Redirectstdio
(stdout
) to a temp file.
[4.7.1] - 2024-02-12
Fixed
- LSP:
checkOnSave = false
not respected when clippy is installed
(introduced with clippy auto-detection in version4.6.0
).
[4.7.0] - 2024-02-11
Added
- Testables: Add
tools.crate_test_executor
option for running
crate test suites (--all-targets
). - Rustc: Do not require a main function,
and support the 2024 edition
viaunstable-options
.
Thanks @saying121!
Fixed
- Neotest: Nested modules + position updates when switching buffers [#223].
Thanks @jameshurst! - Testables: Support
neotest
executor when usingnextest
. - Testables: Support aliases for
test_executor
andcrate_test_executor
.
[4.6.0] - 2024-02-07
Added
- LSP: New
tools.enable_clippy
option (defaults totrue
).
Enable clippy lints on save if acargo-clippy
installation
is detected.
Fixed
- testables/neotest: Don't use nextest if disabled in the config.
- LSP: load project-local rust-analyzer.json configs into
server['rust-analyzer']
, instead of replacing theserver
config.
[4.5.2] - 2024-02-06
Fixed
- runnables/debuggables/testables:
cd
into directory with spaces [#212].
Fixed
[4.5.1] - 2024-02-03
Fixed
- LSP: Notify if an LSP request was made but no rust-analyzer client is attached.
- Neotest: Only the current buffer was queried for test positions.
[4.5.0] - 2024-02-02
Added
- Filtered workspace symbol searches with
:RustLsp[!] workspaceSymbol [onlyTypes?|allSymbols?] [query?]
.
Will include dependencies if called with a bang!
. - Neotest: Basic support for
require('neotest').run.run { suite = true }
.
This will run the current crate's test suite, if detected.
Note that positions are still only discovered for buffers with an attached
LSP client.
[4.4.0] - 2024-02-01
Added
- You can now register a
rustaceanvim.neotest
adapter with neotest.
It will query rust-analyzer for test positions and test commands in any
buffer to which the LSP client is attached.
If you do so,tools.test_executor
will default to a new'neotest'
executor, which will use neotest to runtestables
orrunnables
that are tests. - Support for
require('neotest').run.run { strategy = 'dap' }
.
This will use the same logic as:RustLsp debuggables
to set neotest's
DAP strategy. No extra configuration needed! :RustLsp testables
: Prettier selection options.
Fixes
- DAP(
codelldb
): Redirectstdio
(stdout
) to a temp file.
[4.3.0] - 2024-01-31
Changed
- LSP: Improved parsing of test result failure messages.
[4.2.1] - 2024-01-30
Fixed
- LSP: Only advertise
rust-analyzer.debugSingle
command capability
if nvim-dap is installed. - LSP:
nil
error if running:RustLsp! testables
and there is no
previous testable. - LSP: Update previous testables cache if executing a
rust-analyzer.runSingle
command that is a test.
[4.2.0] - 2024-01-30
Added
- Config: Separate
tools.executor
andtools.test_executor
options.
Thetest_executor
is used for test runnables (e.g.cargo test
). - LSP: New test executor,
'background'
that runs tests in the background
and provides diagnostics for failed tests when complete.
Used by default in Neovim >= 0.10. - LSP:
:RustLsp testables
command, which is equivalent
to:RustLsp runnables
, but filters the runnables for tests only,
Important
In Neovim < 0.10, 'background'
executor blocks the UI while running tests.
[4.1.0] - 2024-01-29
Added
:Rustc unpretty
command:
Userustc -Z unpretty=[mir|hir|...]
to inspect mir and other things,
and achieve an experience similar to Rust Playground.
(currently requires a nightly compiler).
Thanks saying121!- Config:
tools.rustc
arguments forrustc
.
Changed
- Improved command completions.
- Filter suggested subcommand arguments based on existing user input.
- When calling,
:RustLsp!
, show only subcommands that change
behaviour with a bang.
Fixed
- Command completions: Removed completions
forrunnables/debuggables last
.
[4.0.3] - 2024-01-28
Fixed
renderDiagnostic
: Window closes immediately ifauto_focus
is disabled [#193].explainError
/renderDiagnostic
: Fall back to first
detected diagnostic if none is found close to the cursor.
[4.0.2] - 2024-01-27
Fixed
- LSP (standalone): Use
bufnr
passed intolsp.start
function when
determining detached file name.
[4.0.1] - 2024-01-27
Fixed
- LSP: Fix resetting client state on
:RustAnalyzer stop
if only one client is attached.
Performance
- Only setup
vim.lsp.commands
for rust-analyzer on the first
initialization. - Don't run
ftplugin/rust.lua
more than once on the same
buffer.
[4.0.0] - 2024-01-25
BREAKING CHANGES
- To run the previous runnable/debuggable, you would call
:RustLsp runnables last
or:RustLsp debuggables last
.
These two functions now take optional arguments that you can pass to the executables.
The new way to run the previous runnable/debuggable is with a bang (!
).
e.g.:RustLsp! debuggables
.
In Lua, this isvim.cmd.RustLsp { 'debuggables', bang = true }
, and the same
for'runnables'
.
Added
- LSP: Option to fall back to
vim.ui.select
if there
are no code action groups when running:RustLsp codeAction
. - LSP/DAP: Allow overriding executable args with
:RustLsp runnables args[]
and:RustLsp debuggables args[]
.
Fixed
- LSP: Focus lost when secondary float opens on
:RustLsp codeAction
[#169].
[3.17.3] - 2024-01-25
Fixed
- DAP:
nil
safety in standalone files [#182].
[3.17.2] - 2024-01-22
Fixed
- LSP: Properly sanitize hover actions debug command [#179].
Thanks @Tired-Fox!
[3.17.1] - 2024-01-22
Fixed
- Spawn rust-analyzer in detached mode when no project root is found.
This adds support for standalone files without a Rust project.
[3.17.0] - 2024-01-20
Added
- Cache runnables and debuggables run with commands/code lenses.
[3.16.3] - 2024-01-20
Changed
- Performance (DAP): Use cached source map,
LLDB commands and library path. - DAP: Set
autoload_configurations
only for Neovim >= 0.10,
as compiling the debug build is not async in Neovim 0.9.
[3.16.2] - 2024-01-19
Fixed
- DAP:
nil
error when executingrust-analyzer.debugSingle
or:RustLsp debuggables last
commands (introduced in 3.16.0).
[3.16.1] - 2024-01-17
Fixed
- DAP: Improve reliability of loading Rust debug configurations on LSP attach.
- DAP: Assign
lldb
andcodelldb
configurations found inlaunch.json
todap.configurations.rust
.
[3.16.0] - 2024-01-15
Added
- DAP: Better
nvim-dap
integration:
Automatically try to load Rust debug configurations on LSP attach.
This lets you userequire('dap').continue()
instead of:RustLsp debuggables
,
once the configurations have been loaded.
Can be disabled by settingvim.g.rustaceanvim.dap.autoload_configurations = false
.
Fixed
- LSP: If inlay hints are enabled for a buffer, force Neovim
to redraw them when rust-analyzer has fully initialized.
This is a workaround for neovim/26511. - LSP: On client stop, reset the
experimental/serverStatus
handler's
internal state for the respective client, so that the handler can be
rerun on restart. - LSP/Windows: Normalize case sensitive
root_dir
[#151].
Thanks @TrungNguyen153!
[3.15.0] - 2024-01-11
Added
:RustAnalyzer restart
command.- Smarter completions for
:RustAnalyzer
commands.- Only suggest
start
command if there is no
active client for the current buff...
- Only suggest
4.7.5
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.
[4.7.5] - 2024-02-20
Fixed
- DAP: Use deep copies of dap configs.
- DAP: Bad config validation:
dap.configuration.env
should be
atable
, not astring
.
[4.7.4] - 2024-02-19
Fixed
- LSP: Support both top-level rust-analyzer object and object with
"rust-analyzer":
key when importing settings fromrust-analyzer.json
.
The fix introduced in version 4.6.0 had accidentally broken
backward compatibility. The new implementation is backward compatible again.
[4.7.3] - 2024-02-15
Fixed
- LSP: Error when running
reloadWorkspace
,
rebuildMacros
orworkspaceSymbol
from a non-rust buffer [#234]. - Internal: Don't pass client not found error to handler.
[4.7.2] - 2024-02-13
Revert
- DAP(
codelldb
): Redirectstdio
(stdout
) to a temp file.
[4.7.1] - 2024-02-12
Fixed
- LSP:
checkOnSave = false
not respected when clippy is installed
(introduced with clippy auto-detection in version4.6.0
).
[4.7.0] - 2024-02-11
Added
- Testables: Add
tools.crate_test_executor
option for running
crate test suites (--all-targets
). - Rustc: Do not require a main function,
and support the 2024 edition
viaunstable-options
.
Thanks @saying121!
Fixed
- Neotest: Nested modules + position updates when switching buffers [#223].
Thanks @jameshurst! - Testables: Support
neotest
executor when usingnextest
. - Testables: Support aliases for
test_executor
andcrate_test_executor
.
[4.6.0] - 2024-02-07
Added
- LSP: New
tools.enable_clippy
option (defaults totrue
).
Enable clippy lints on save if acargo-clippy
installation
is detected.
Fixed
- testables/neotest: Don't use nextest if disabled in the config.
- LSP: load project-local rust-analyzer.json configs into
server['rust-analyzer']
, instead of replacing theserver
config.
[4.5.2] - 2024-02-06
Fixed
- runnables/debuggables/testables:
cd
into directory with spaces [#212].
Fixed
[4.5.1] - 2024-02-03
Fixed
- LSP: Notify if an LSP request was made but no rust-analyzer client is attached.
- Neotest: Only the current buffer was queried for test positions.
[4.5.0] - 2024-02-02
Added
- Filtered workspace symbol searches with
:RustLsp[!] workspaceSymbol [onlyTypes?|allSymbols?] [query?]
.
Will include dependencies if called with a bang!
. - Neotest: Basic support for
require('neotest').run.run { suite = true }
.
This will run the current crate's test suite, if detected.
Note that positions are still only discovered for buffers with an attached
LSP client.
[4.4.0] - 2024-02-01
Added
- You can now register a
rustaceanvim.neotest
adapter with neotest.
It will query rust-analyzer for test positions and test commands in any
buffer to which the LSP client is attached.
If you do so,tools.test_executor
will default to a new'neotest'
executor, which will use neotest to runtestables
orrunnables
that are tests. - Support for
require('neotest').run.run { strategy = 'dap' }
.
This will use the same logic as:RustLsp debuggables
to set neotest's
DAP strategy. No extra configuration needed! :RustLsp testables
: Prettier selection options.
Fixes
- DAP(
codelldb
): Redirectstdio
(stdout
) to a temp file.
[4.3.0] - 2024-01-31
Changed
- LSP: Improved parsing of test result failure messages.
[4.2.1] - 2024-01-30
Fixed
- LSP: Only advertise
rust-analyzer.debugSingle
command capability
if nvim-dap is installed. - LSP:
nil
error if running:RustLsp! testables
and there is no
previous testable. - LSP: Update previous testables cache if executing a
rust-analyzer.runSingle
command that is a test.
[4.2.0] - 2024-01-30
Added
- Config: Separate
tools.executor
andtools.test_executor
options.
Thetest_executor
is used for test runnables (e.g.cargo test
). - LSP: New test executor,
'background'
that runs tests in the background
and provides diagnostics for failed tests when complete.
Used by default in Neovim >= 0.10. - LSP:
:RustLsp testables
command, which is equivalent
to:RustLsp runnables
, but filters the runnables for tests only,
Important
In Neovim < 0.10, 'background'
executor blocks the UI while running tests.
[4.1.0] - 2024-01-29
Added
:Rustc unpretty
command:
Userustc -Z unpretty=[mir|hir|...]
to inspect mir and other things,
and achieve an experience similar to Rust Playground.
(currently requires a nightly compiler).
Thanks saying121!- Config:
tools.rustc
arguments forrustc
.
Changed
- Improved command completions.
- Filter suggested subcommand arguments based on existing user input.
- When calling,
:RustLsp!
, show only subcommands that change
behaviour with a bang.
Fixed
- Command completions: Removed completions
forrunnables/debuggables last
.
[4.0.3] - 2024-01-28
Fixed
renderDiagnostic
: Window closes immediately ifauto_focus
is disabled [#193].explainError
/renderDiagnostic
: Fall back to first
detected diagnostic if none is found close to the cursor.
[4.0.2] - 2024-01-27
Fixed
- LSP (standalone): Use
bufnr
passed intolsp.start
function when
determining detached file name.
[4.0.1] - 2024-01-27
Fixed
- LSP: Fix resetting client state on
:RustAnalyzer stop
if only one client is attached.
Performance
- Only setup
vim.lsp.commands
for rust-analyzer on the first
initialization. - Don't run
ftplugin/rust.lua
more than once on the same
buffer.
[4.0.0] - 2024-01-25
BREAKING CHANGES
- To run the previous runnable/debuggable, you would call
:RustLsp runnables last
or:RustLsp debuggables last
.
These two functions now take optional arguments that you can pass to the executables.
The new way to run the previous runnable/debuggable is with a bang (!
).
e.g.:RustLsp! debuggables
.
In Lua, this isvim.cmd.RustLsp { 'debuggables', bang = true }
, and the same
for'runnables'
.
Added
- LSP: Option to fall back to
vim.ui.select
if there
are no code action groups when running:RustLsp codeAction
. - LSP/DAP: Allow overriding executable args with
:RustLsp runnables args[]
and:RustLsp debuggables args[]
.
Fixed
- LSP: Focus lost when secondary float opens on
:RustLsp codeAction
[#169].
[3.17.3] - 2024-01-25
Fixed
- DAP:
nil
safety in standalone files [#182].
[3.17.2] - 2024-01-22
Fixed
- LSP: Properly sanitize hover actions debug command [#179].
Thanks @Tired-Fox!
[3.17.1] - 2024-01-22
Fixed
- Spawn rust-analyzer in detached mode when no project root is found.
This adds support for standalone files without a Rust project.
[3.17.0] - 2024-01-20
Added
- Cache runnables and debuggables run with commands/code lenses.
[3.16.3] - 2024-01-20
Changed
- Performance (DAP): Use cached source map,
LLDB commands and library path. - DAP: Set
autoload_configurations
only for Neovim >= 0.10,
as compiling the debug build is not async in Neovim 0.9.
[3.16.2] - 2024-01-19
Fixed
- DAP:
nil
error when executingrust-analyzer.debugSingle
or:RustLsp debuggables last
commands (introduced in 3.16.0).
[3.16.1] - 2024-01-17
Fixed
- DAP: Improve reliability of loading Rust debug configurations on LSP attach.
- DAP: Assign
lldb
andcodelldb
configurations found inlaunch.json
todap.configurations.rust
.
[3.16.0] - 2024-01-15
Added
- DAP: Better
nvim-dap
integration:
Automatically try to load Rust debug configurations on LSP attach.
This lets you userequire('dap').continue()
instead of:RustLsp debuggables
,
once the configurations have been loaded.
Can be disabled by settingvim.g.rustaceanvim.dap.autoload_configurations = false
.
Fixed
- LSP: If inlay hints are enabled for a buffer, force Neovim
to redraw them when rust-analyzer has fully initialized.
This is a workaround for neovim/26511. - LSP: On client stop, reset the
experimental/serverStatus
handler's
internal state for the respective client, so that the handler can be
rerun on restart. - LSP/Windows: Normalize case sensitive
root_dir
[#151].
Thanks @TrungNguyen153!
[3.15.0] - 2024-01-11
Added
:RustAnalyzer restart
command.- Smarter completions for
:RustAnalyzer
commands.- Only suggest
start
command if there is no
active client for the current buffer - Only suggest
stop
andrestart
if there is an
active client for the current buffer
- Only suggest
[3.14.0] - 2024-01-10
Added
:RustLsp renderDiagnostic
command:
Render diagnostics as displayed duringcargo build
.- Add
Open in split
action toexplainError
andrenderDiagnostic
float preview windows.
[3.13.1] - 2024-01-10
Fixed
- DAP: Use
codelldb
adapter nvim-dap field when usingcodelldb
.
[3.13.0] - 2024-01-09
Added
- Config:
tools.float_win_config
for all floating Windows
created by this plugin.
...
4.7.4
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.
[4.7.4] - 2024-02-19
Fixed
- LSP: Support both top-level rust-analyzer object and object with
"rust-analyzer":
key when importing settings fromrust-analyzer.json
.
The fix introduced in version 4.6.0 had accidentally broken
backward compatibility. The new implementation is backward compatible again.
[4.7.3] - 2024-02-15
Fixed
- LSP: Error when running
reloadWorkspace
,
rebuildMacros
orworkspaceSymbol
from a non-rust buffer [#234]. - Internal: Don't pass client not found error to handler.
[4.7.2] - 2024-02-13
Revert
- DAP(
codelldb
): Redirectstdio
(stdout
) to a temp file.
[4.7.1] - 2024-02-12
Fixed
- LSP:
checkOnSave = false
not respected when clippy is installed
(introduced with clippy auto-detection in version4.6.0
).
[4.7.0] - 2024-02-11
Added
- Testables: Add
tools.crate_test_executor
option for running
crate test suites (--all-targets
). - Rustc: Do not require a main function,
and support the 2024 edition
viaunstable-options
.
Thanks @saying121!
Fixed
- Neotest: Nested modules + position updates when switching buffers [#223].
Thanks @jameshurst! - Testables: Support
neotest
executor when usingnextest
. - Testables: Support aliases for
test_executor
andcrate_test_executor
.
[4.6.0] - 2024-02-07
Added
- LSP: New
tools.enable_clippy
option (defaults totrue
).
Enable clippy lints on save if acargo-clippy
installation
is detected.
Fixed
- testables/neotest: Don't use nextest if disabled in the config.
- LSP: load project-local rust-analyzer.json configs into
server['rust-analyzer']
, instead of replacing theserver
config.
[4.5.2] - 2024-02-06
Fixed
- runnables/debuggables/testables:
cd
into directory with spaces [#212].
Fixed
[4.5.1] - 2024-02-03
Fixed
- LSP: Notify if an LSP request was made but no rust-analyzer client is attached.
- Neotest: Only the current buffer was queried for test positions.
[4.5.0] - 2024-02-02
Added
- Filtered workspace symbol searches with
:RustLsp[!] workspaceSymbol [onlyTypes?|allSymbols?] [query?]
.
Will include dependencies if called with a bang!
. - Neotest: Basic support for
require('neotest').run.run { suite = true }
.
This will run the current crate's test suite, if detected.
Note that positions are still only discovered for buffers with an attached
LSP client.
[4.4.0] - 2024-02-01
Added
- You can now register a
rustaceanvim.neotest
adapter with neotest.
It will query rust-analyzer for test positions and test commands in any
buffer to which the LSP client is attached.
If you do so,tools.test_executor
will default to a new'neotest'
executor, which will use neotest to runtestables
orrunnables
that are tests. - Support for
require('neotest').run.run { strategy = 'dap' }
.
This will use the same logic as:RustLsp debuggables
to set neotest's
DAP strategy. No extra configuration needed! :RustLsp testables
: Prettier selection options.
Fixes
- DAP(
codelldb
): Redirectstdio
(stdout
) to a temp file.
[4.3.0] - 2024-01-31
Changed
- LSP: Improved parsing of test result failure messages.
[4.2.1] - 2024-01-30
Fixed
- LSP: Only advertise
rust-analyzer.debugSingle
command capability
if nvim-dap is installed. - LSP:
nil
error if running:RustLsp! testables
and there is no
previous testable. - LSP: Update previous testables cache if executing a
rust-analyzer.runSingle
command that is a test.
[4.2.0] - 2024-01-30
Added
- Config: Separate
tools.executor
andtools.test_executor
options.
Thetest_executor
is used for test runnables (e.g.cargo test
). - LSP: New test executor,
'background'
that runs tests in the background
and provides diagnostics for failed tests when complete.
Used by default in Neovim >= 0.10. - LSP:
:RustLsp testables
command, which is equivalent
to:RustLsp runnables
, but filters the runnables for tests only,
Important
In Neovim < 0.10, 'background'
executor blocks the UI while running tests.
[4.1.0] - 2024-01-29
Added
:Rustc unpretty
command:
Userustc -Z unpretty=[mir|hir|...]
to inspect mir and other things,
and achieve an experience similar to Rust Playground.
(currently requires a nightly compiler).
Thanks saying121!- Config:
tools.rustc
arguments forrustc
.
Changed
- Improved command completions.
- Filter suggested subcommand arguments based on existing user input.
- When calling,
:RustLsp!
, show only subcommands that change
behaviour with a bang.
Fixed
- Command completions: Removed completions
forrunnables/debuggables last
.
[4.0.3] - 2024-01-28
Fixed
renderDiagnostic
: Window closes immediately ifauto_focus
is disabled [#193].explainError
/renderDiagnostic
: Fall back to first
detected diagnostic if none is found close to the cursor.
[4.0.2] - 2024-01-27
Fixed
- LSP (standalone): Use
bufnr
passed intolsp.start
function when
determining detached file name.
[4.0.1] - 2024-01-27
Fixed
- LSP: Fix resetting client state on
:RustAnalyzer stop
if only one client is attached.
Performance
- Only setup
vim.lsp.commands
for rust-analyzer on the first
initialization. - Don't run
ftplugin/rust.lua
more than once on the same
buffer.
[4.0.0] - 2024-01-25
BREAKING CHANGES
- To run the previous runnable/debuggable, you would call
:RustLsp runnables last
or:RustLsp debuggables last
.
These two functions now take optional arguments that you can pass to the executables.
The new way to run the previous runnable/debuggable is with a bang (!
).
e.g.:RustLsp! debuggables
.
In Lua, this isvim.cmd.RustLsp { 'debuggables', bang = true }
, and the same
for'runnables'
.
Added
- LSP: Option to fall back to
vim.ui.select
if there
are no code action groups when running:RustLsp codeAction
. - LSP/DAP: Allow overriding executable args with
:RustLsp runnables args[]
and:RustLsp debuggables args[]
.
Fixed
- LSP: Focus lost when secondary float opens on
:RustLsp codeAction
[#169].
[3.17.3] - 2024-01-25
Fixed
- DAP:
nil
safety in standalone files [#182].
[3.17.2] - 2024-01-22
Fixed
- LSP: Properly sanitize hover actions debug command [#179].
Thanks @Tired-Fox!
[3.17.1] - 2024-01-22
Fixed
- Spawn rust-analyzer in detached mode when no project root is found.
This adds support for standalone files without a Rust project.
[3.17.0] - 2024-01-20
Added
- Cache runnables and debuggables run with commands/code lenses.
[3.16.3] - 2024-01-20
Changed
- Performance (DAP): Use cached source map,
LLDB commands and library path. - DAP: Set
autoload_configurations
only for Neovim >= 0.10,
as compiling the debug build is not async in Neovim 0.9.
[3.16.2] - 2024-01-19
Fixed
- DAP:
nil
error when executingrust-analyzer.debugSingle
or:RustLsp debuggables last
commands (introduced in 3.16.0).
[3.16.1] - 2024-01-17
Fixed
- DAP: Improve reliability of loading Rust debug configurations on LSP attach.
- DAP: Assign
lldb
andcodelldb
configurations found inlaunch.json
todap.configurations.rust
.
[3.16.0] - 2024-01-15
Added
- DAP: Better
nvim-dap
integration:
Automatically try to load Rust debug configurations on LSP attach.
This lets you userequire('dap').continue()
instead of:RustLsp debuggables
,
once the configurations have been loaded.
Can be disabled by settingvim.g.rustaceanvim.dap.autoload_configurations = false
.
Fixed
- LSP: If inlay hints are enabled for a buffer, force Neovim
to redraw them when rust-analyzer has fully initialized.
This is a workaround for neovim/26511. - LSP: On client stop, reset the
experimental/serverStatus
handler's
internal state for the respective client, so that the handler can be
rerun on restart. - LSP/Windows: Normalize case sensitive
root_dir
[#151].
Thanks @TrungNguyen153!
[3.15.0] - 2024-01-11
Added
:RustAnalyzer restart
command.- Smarter completions for
:RustAnalyzer
commands.- Only suggest
start
command if there is no
active client for the current buffer - Only suggest
stop
andrestart
if there is an
active client for the current buffer
- Only suggest
[3.14.0] - 2024-01-10
Added
:RustLsp renderDiagnostic
command:
Render diagnostics as displayed duringcargo build
.- Add
Open in split
action toexplainError
andrenderDiagnostic
float preview windows.
[3.13.1] - 2024-01-10
Fixed
- DAP: Use
codelldb
adapter nvim-dap field when usingcodelldb
.
[3.13.0] - 2024-01-09
Added
- Config:
tools.float_win_config
for all floating Windows
created by this plugin.
Movedborder
,max_width
,max_height
,auto_focus
fromhover_actions
tofloat_win_config
.
Thehover_actions
window options are still applied
if they ex...
4.7.3
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.
[4.7.3] - 2024-02-15
Fixed
- LSP: Error when running
reloadWorkspace
,
rebuildMacros
orworkspaceSymbol
from a non-rust buffer [#234]. - Internal: Don't pass client not found error to handler.
[4.7.2] - 2024-02-13
Revert
- DAP(
codelldb
): Redirectstdio
(stdout
) to a temp file.
[4.7.1] - 2024-02-12
Fixed
- LSP:
checkOnSave = false
not respected when clippy is installed
(introduced with clippy auto-detection in version4.6.0
).
[4.7.0] - 2024-02-11
Added
- Testables: Add
tools.crate_test_executor
option for running
crate test suites (--all-targets
). - Rustc: Do not require a main function,
and support the 2024 edition
viaunstable-options
.
Thanks @saying121!
Fixed
- Neotest: Nested modules + position updates when switching buffers [#223].
Thanks @jameshurst! - Testables: Support
neotest
executor when usingnextest
. - Testables: Support aliases for
test_executor
andcrate_test_executor
.
[4.6.0] - 2024-02-07
Added
- LSP: New
tools.enable_clippy
option (defaults totrue
).
Enable clippy lints on save if acargo-clippy
installation
is detected.
Fixed
- testables/neotest: Don't use nextest if disabled in the config.
- LSP: load project-local rust-analyzer.json configs into
server['rust-analyzer']
, instead of replacing theserver
config.
[4.5.2] - 2024-02-06
Fixed
- runnables/debuggables/testables:
cd
into directory with spaces [#212].
Fixed
[4.5.1] - 2024-02-03
Fixed
- LSP: Notify if an LSP request was made but no rust-analyzer client is attached.
- Neotest: Only the current buffer was queried for test positions.
[4.5.0] - 2024-02-02
Added
- Filtered workspace symbol searches with
:RustLsp[!] workspaceSymbol [onlyTypes?|allSymbols?] [query?]
.
Will include dependencies if called with a bang!
. - Neotest: Basic support for
require('neotest').run.run { suite = true }
.
This will run the current crate's test suite, if detected.
Note that positions are still only discovered for buffers with an attached
LSP client.
[4.4.0] - 2024-02-01
Added
- You can now register a
rustaceanvim.neotest
adapter with neotest.
It will query rust-analyzer for test positions and test commands in any
buffer to which the LSP client is attached.
If you do so,tools.test_executor
will default to a new'neotest'
executor, which will use neotest to runtestables
orrunnables
that are tests. - Support for
require('neotest').run.run { strategy = 'dap' }
.
This will use the same logic as:RustLsp debuggables
to set neotest's
DAP strategy. No extra configuration needed! :RustLsp testables
: Prettier selection options.
Fixes
- DAP(
codelldb
): Redirectstdio
(stdout
) to a temp file.
[4.3.0] - 2024-01-31
Changed
- LSP: Improved parsing of test result failure messages.
[4.2.1] - 2024-01-30
Fixed
- LSP: Only advertise
rust-analyzer.debugSingle
command capability
if nvim-dap is installed. - LSP:
nil
error if running:RustLsp! testables
and there is no
previous testable. - LSP: Update previous testables cache if executing a
rust-analyzer.runSingle
command that is a test.
[4.2.0] - 2024-01-30
Added
- Config: Separate
tools.executor
andtools.test_executor
options.
Thetest_executor
is used for test runnables (e.g.cargo test
). - LSP: New test executor,
'background'
that runs tests in the background
and provides diagnostics for failed tests when complete.
Used by default in Neovim >= 0.10. - LSP:
:RustLsp testables
command, which is equivalent
to:RustLsp runnables
, but filters the runnables for tests only,
Important
In Neovim < 0.10, 'background'
executor blocks the UI while running tests.
[4.1.0] - 2024-01-29
Added
:Rustc unpretty
command:
Userustc -Z unpretty=[mir|hir|...]
to inspect mir and other things,
and achieve an experience similar to Rust Playground.
(currently requires a nightly compiler).
Thanks saying121!- Config:
tools.rustc
arguments forrustc
.
Changed
- Improved command completions.
- Filter suggested subcommand arguments based on existing user input.
- When calling,
:RustLsp!
, show only subcommands that change
behaviour with a bang.
Fixed
- Command completions: Removed completions
forrunnables/debuggables last
.
[4.0.3] - 2024-01-28
Fixed
renderDiagnostic
: Window closes immediately ifauto_focus
is disabled [#193].explainError
/renderDiagnostic
: Fall back to first
detected diagnostic if none is found close to the cursor.
[4.0.2] - 2024-01-27
Fixed
- LSP (standalone): Use
bufnr
passed intolsp.start
function when
determining detached file name.
[4.0.1] - 2024-01-27
Fixed
- LSP: Fix resetting client state on
:RustAnalyzer stop
if only one client is attached.
Performance
- Only setup
vim.lsp.commands
for rust-analyzer on the first
initialization. - Don't run
ftplugin/rust.lua
more than once on the same
buffer.
[4.0.0] - 2024-01-25
BREAKING CHANGES
- To run the previous runnable/debuggable, you would call
:RustLsp runnables last
or:RustLsp debuggables last
.
These two functions now take optional arguments that you can pass to the executables.
The new way to run the previous runnable/debuggable is with a bang (!
).
e.g.:RustLsp! debuggables
.
In Lua, this isvim.cmd.RustLsp { 'debuggables', bang = true }
, and the same
for'runnables'
.
Added
- LSP: Option to fall back to
vim.ui.select
if there
are no code action groups when running:RustLsp codeAction
. - LSP/DAP: Allow overriding executable args with
:RustLsp runnables args[]
and:RustLsp debuggables args[]
.
Fixed
- LSP: Focus lost when secondary float opens on
:RustLsp codeAction
[#169].
[3.17.3] - 2024-01-25
Fixed
- DAP:
nil
safety in standalone files [#182].
[3.17.2] - 2024-01-22
Fixed
- LSP: Properly sanitize hover actions debug command [#179].
Thanks @Tired-Fox!
[3.17.1] - 2024-01-22
Fixed
- Spawn rust-analyzer in detached mode when no project root is found.
This adds support for standalone files without a Rust project.
[3.17.0] - 2024-01-20
Added
- Cache runnables and debuggables run with commands/code lenses.
[3.16.3] - 2024-01-20
Changed
- Performance (DAP): Use cached source map,
LLDB commands and library path. - DAP: Set
autoload_configurations
only for Neovim >= 0.10,
as compiling the debug build is not async in Neovim 0.9.
[3.16.2] - 2024-01-19
Fixed
- DAP:
nil
error when executingrust-analyzer.debugSingle
or:RustLsp debuggables last
commands (introduced in 3.16.0).
[3.16.1] - 2024-01-17
Fixed
- DAP: Improve reliability of loading Rust debug configurations on LSP attach.
- DAP: Assign
lldb
andcodelldb
configurations found inlaunch.json
todap.configurations.rust
.
[3.16.0] - 2024-01-15
Added
- DAP: Better
nvim-dap
integration:
Automatically try to load Rust debug configurations on LSP attach.
This lets you userequire('dap').continue()
instead of:RustLsp debuggables
,
once the configurations have been loaded.
Can be disabled by settingvim.g.rustaceanvim.dap.autoload_configurations = false
.
Fixed
- LSP: If inlay hints are enabled for a buffer, force Neovim
to redraw them when rust-analyzer has fully initialized.
This is a workaround for neovim/26511. - LSP: On client stop, reset the
experimental/serverStatus
handler's
internal state for the respective client, so that the handler can be
rerun on restart. - LSP/Windows: Normalize case sensitive
root_dir
[#151].
Thanks @TrungNguyen153!
[3.15.0] - 2024-01-11
Added
:RustAnalyzer restart
command.- Smarter completions for
:RustAnalyzer
commands.- Only suggest
start
command if there is no
active client for the current buffer - Only suggest
stop
andrestart
if there is an
active client for the current buffer
- Only suggest
[3.14.0] - 2024-01-10
Added
:RustLsp renderDiagnostic
command:
Render diagnostics as displayed duringcargo build
.- Add
Open in split
action toexplainError
andrenderDiagnostic
float preview windows.
[3.13.1] - 2024-01-10
Fixed
- DAP: Use
codelldb
adapter nvim-dap field when usingcodelldb
.
[3.13.0] - 2024-01-09
Added
- Config:
tools.float_win_config
for all floating Windows
created by this plugin.
Movedborder
,max_width
,max_height
,auto_focus
fromhover_actions
tofloat_win_config
.
Thehover_actions
window options are still applied
if they exist, so as not to break compatibility.
Thanks @saying121!
Fixed
- DAP: Don't load
lldb_commands
when usingcodelldb
. - DAP: Make sure the client configuration type is 'codelldb'
when using a 'codelldb' adapter.
[3.12.2] - 2024-01-07
Fixed
- LSP: Don't set `augments...
4.7.2
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.
[4.7.2] - 2024-02-13
Revert
- DAP(
codelldb
): Redirectstdio
(stdout
) to a temp file.
[4.7.1] - 2024-02-12
Fixed
- LSP:
checkOnSave = false
not respected when clippy is installed
(introduced with clippy auto-detection in version4.6.0
).
[4.7.0] - 2024-02-11
Added
- Testables: Add
tools.crate_test_executor
option for running
crate test suites (--all-targets
). - Rustc: Do not require a main function,
and support the 2024 edition
viaunstable-options
.
Thanks @saying121!
Fixed
- Neotest: Nested modules + position updates when switching buffers [#223].
Thanks @jameshurst! - Testables: Support
neotest
executor when usingnextest
. - Testables: Support aliases for
test_executor
andcrate_test_executor
.
[4.6.0] - 2024-02-07
Added
- LSP: New
tools.enable_clippy
option (defaults totrue
).
Enable clippy lints on save if acargo-clippy
installation
is detected.
Fixed
- testables/neotest: Don't use nextest if disabled in the config.
- LSP: load project-local rust-analyzer.json configs into
server['rust-analyzer']
, instead of replacing theserver
config.
[4.5.2] - 2024-02-06
Fixed
- runnables/debuggables/testables:
cd
into directory with spaces [#212].
Fixed
[4.5.1] - 2024-02-03
Fixed
- LSP: Notify if an LSP request was made but no rust-analyzer client is attached.
- Neotest: Only the current buffer was queried for test positions.
[4.5.0] - 2024-02-02
Added
- Filtered workspace symbol searches with
:RustLsp[!] workspaceSymbol [onlyTypes?|allSymbols?] [query?]
.
Will include dependencies if called with a bang!
. - Neotest: Basic support for
require('neotest').run.run { suite = true }
.
This will run the current crate's test suite, if detected.
Note that positions are still only discovered for buffers with an attached
LSP client.
[4.4.0] - 2024-02-01
Added
- You can now register a
rustaceanvim.neotest
adapter with neotest.
It will query rust-analyzer for test positions and test commands in any
buffer to which the LSP client is attached.
If you do so,tools.test_executor
will default to a new'neotest'
executor, which will use neotest to runtestables
orrunnables
that are tests. - Support for
require('neotest').run.run { strategy = 'dap' }
.
This will use the same logic as:RustLsp debuggables
to set neotest's
DAP strategy. No extra configuration needed! :RustLsp testables
: Prettier selection options.
Fixes
- DAP(
codelldb
): Redirectstdio
(stdout
) to a temp file.
[4.3.0] - 2024-01-31
Changed
- LSP: Improved parsing of test result failure messages.
[4.2.1] - 2024-01-30
Fixed
- LSP: Only advertise
rust-analyzer.debugSingle
command capability
if nvim-dap is installed. - LSP:
nil
error if running:RustLsp! testables
and there is no
previous testable. - LSP: Update previous testables cache if executing a
rust-analyzer.runSingle
command that is a test.
[4.2.0] - 2024-01-30
Added
- Config: Separate
tools.executor
andtools.test_executor
options.
Thetest_executor
is used for test runnables (e.g.cargo test
). - LSP: New test executor,
'background'
that runs tests in the background
and provides diagnostics for failed tests when complete.
Used by default in Neovim >= 0.10. - LSP:
:RustLsp testables
command, which is equivalent
to:RustLsp runnables
, but filters the runnables for tests only,
Important
In Neovim < 0.10, 'background'
executor blocks the UI while running tests.
[4.1.0] - 2024-01-29
Added
:Rustc unpretty
command:
Userustc -Z unpretty=[mir|hir|...]
to inspect mir and other things,
and achieve an experience similar to Rust Playground.
(currently requires a nightly compiler).
Thanks saying121!- Config:
tools.rustc
arguments forrustc
.
Changed
- Improved command completions.
- Filter suggested subcommand arguments based on existing user input.
- When calling,
:RustLsp!
, show only subcommands that change
behaviour with a bang.
Fixed
- Command completions: Removed completions
forrunnables/debuggables last
.
[4.0.3] - 2024-01-28
Fixed
renderDiagnostic
: Window closes immediately ifauto_focus
is disabled [#193].explainError
/renderDiagnostic
: Fall back to first
detected diagnostic if none is found close to the cursor.
[4.0.2] - 2024-01-27
Fixed
- LSP (standalone): Use
bufnr
passed intolsp.start
function when
determining detached file name.
[4.0.1] - 2024-01-27
Fixed
- LSP: Fix resetting client state on
:RustAnalyzer stop
if only one client is attached.
Performance
- Only setup
vim.lsp.commands
for rust-analyzer on the first
initialization. - Don't run
ftplugin/rust.lua
more than once on the same
buffer.
[4.0.0] - 2024-01-25
BREAKING CHANGES
- To run the previous runnable/debuggable, you would call
:RustLsp runnables last
or:RustLsp debuggables last
.
These two functions now take optional arguments that you can pass to the executables.
The new way to run the previous runnable/debuggable is with a bang (!
).
e.g.:RustLsp! debuggables
.
In Lua, this isvim.cmd.RustLsp { 'debuggables', bang = true }
, and the same
for'runnables'
.
Added
- LSP: Option to fall back to
vim.ui.select
if there
are no code action groups when running:RustLsp codeAction
. - LSP/DAP: Allow overriding executable args with
:RustLsp runnables args[]
and:RustLsp debuggables args[]
.
Fixed
- LSP: Focus lost when secondary float opens on
:RustLsp codeAction
[#169].
[3.17.3] - 2024-01-25
Fixed
- DAP:
nil
safety in standalone files [#182].
[3.17.2] - 2024-01-22
Fixed
- LSP: Properly sanitize hover actions debug command [#179].
Thanks @Tired-Fox!
[3.17.1] - 2024-01-22
Fixed
- Spawn rust-analyzer in detached mode when no project root is found.
This adds support for standalone files without a Rust project.
[3.17.0] - 2024-01-20
Added
- Cache runnables and debuggables run with commands/code lenses.
[3.16.3] - 2024-01-20
Changed
- Performance (DAP): Use cached source map,
LLDB commands and library path. - DAP: Set
autoload_configurations
only for Neovim >= 0.10,
as compiling the debug build is not async in Neovim 0.9.
[3.16.2] - 2024-01-19
Fixed
- DAP:
nil
error when executingrust-analyzer.debugSingle
or:RustLsp debuggables last
commands (introduced in 3.16.0).
[3.16.1] - 2024-01-17
Fixed
- DAP: Improve reliability of loading Rust debug configurations on LSP attach.
- DAP: Assign
lldb
andcodelldb
configurations found inlaunch.json
todap.configurations.rust
.
[3.16.0] - 2024-01-15
Added
- DAP: Better
nvim-dap
integration:
Automatically try to load Rust debug configurations on LSP attach.
This lets you userequire('dap').continue()
instead of:RustLsp debuggables
,
once the configurations have been loaded.
Can be disabled by settingvim.g.rustaceanvim.dap.autoload_configurations = false
.
Fixed
- LSP: If inlay hints are enabled for a buffer, force Neovim
to redraw them when rust-analyzer has fully initialized.
This is a workaround for neovim/26511. - LSP: On client stop, reset the
experimental/serverStatus
handler's
internal state for the respective client, so that the handler can be
rerun on restart. - LSP/Windows: Normalize case sensitive
root_dir
[#151].
Thanks @TrungNguyen153!
[3.15.0] - 2024-01-11
Added
:RustAnalyzer restart
command.- Smarter completions for
:RustAnalyzer
commands.- Only suggest
start
command if there is no
active client for the current buffer - Only suggest
stop
andrestart
if there is an
active client for the current buffer
- Only suggest
[3.14.0] - 2024-01-10
Added
:RustLsp renderDiagnostic
command:
Render diagnostics as displayed duringcargo build
.- Add
Open in split
action toexplainError
andrenderDiagnostic
float preview windows.
[3.13.1] - 2024-01-10
Fixed
- DAP: Use
codelldb
adapter nvim-dap field when usingcodelldb
.
[3.13.0] - 2024-01-09
Added
- Config:
tools.float_win_config
for all floating Windows
created by this plugin.
Movedborder
,max_width
,max_height
,auto_focus
fromhover_actions
tofloat_win_config
.
Thehover_actions
window options are still applied
if they exist, so as not to break compatibility.
Thanks @saying121!
Fixed
- DAP: Don't load
lldb_commands
when usingcodelldb
. - DAP: Make sure the client configuration type is 'codelldb'
when using a 'codelldb' adapter.
[3.12.2] - 2024-01-07
Fixed
- LSP: Don't set
augmentsSyntaxTokens
capability.
This appears to cause problems for some colorschemes.
[3.12.1] - 2024-01-06
Fixed
- Config: Report error if new validations fail.
[3.12.0] - 2024-01-06
Added
- Config: Some more validations.