Skip to content

Commit ae759e6

Browse files
authored
fix(lsp): checkOnSave = false not respected if clippy is installed (#230)
1 parent a23ca1b commit ae759e6

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+
## [Unreleased]
10+
11+
### Fixed
12+
13+
- LSP: `checkOnSave = false` not respected when clippy is installed
14+
(introduced with clippy auto-detection in version `4.6.0`).
15+
916
## [4.7.0] - 2024-02-11
1017

1118
### Added

lua/rustaceanvim/config/server.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function server.load_rust_analyzer_settings(project_root, opts)
3131
local default_settings = config.server.default_settings
3232
local use_clippy = config.tools.enable_clippy and vim.fn.executable('cargo-clippy') == 1
3333
---@diagnostic disable-next-line: undefined-field
34-
if not default_settings['rust-analyzer'].checkOnSave and use_clippy then
34+
if default_settings['rust-analyzer'].checkOnSave == nil and use_clippy then
3535
---@diagnostic disable-next-line: inject-field
3636
default_settings['rust-analyzer'].checkOnSave = {
3737
allFeatures = true,

0 commit comments

Comments
 (0)