diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b4baa7d..f5d76e2a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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). +## [Unreleased] + +### Fixed + +- LSP: `checkOnSave = false` not respected when clippy is installed + (introduced with clippy auto-detection in version `4.6.0`). + ## [4.7.0] - 2024-02-11 ### Added diff --git a/lua/rustaceanvim/config/server.lua b/lua/rustaceanvim/config/server.lua index 455140c8..21dd5d10 100644 --- a/lua/rustaceanvim/config/server.lua +++ b/lua/rustaceanvim/config/server.lua @@ -31,7 +31,7 @@ function server.load_rust_analyzer_settings(project_root, opts) local default_settings = config.server.default_settings local use_clippy = config.tools.enable_clippy and vim.fn.executable('cargo-clippy') == 1 ---@diagnostic disable-next-line: undefined-field - if not default_settings['rust-analyzer'].checkOnSave and use_clippy then + if default_settings['rust-analyzer'].checkOnSave == nil and use_clippy then ---@diagnostic disable-next-line: inject-field default_settings['rust-analyzer'].checkOnSave = { allFeatures = true,