From e306c742bd7f7183e371cd91268b72d9db1bbae0 Mon Sep 17 00:00:00 2001 From: Marc Jakobi Date: Fri, 24 May 2024 09:29:16 +0200 Subject: [PATCH] fix(lsp): inability to load rust-analyzer.json without rust-analzyer key --- CHANGELOG.md | 7 +++++++ lua/rustaceanvim/config/server.lua | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a3b9b1cd..758efb2b 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). +## [4.23.5] - 2024-05-24 + +### Fixed + +- LSP: Bug preventing rustaceanvim from loading `rust-analyzer.json` settings + if there's no `"rust-analyzer":` key. + ## [4.23.4] - 2024-05-23 ### Fixed diff --git a/lua/rustaceanvim/config/server.lua b/lua/rustaceanvim/config/server.lua index e936ae2a..fee92dba 100644 --- a/lua/rustaceanvim/config/server.lua +++ b/lua/rustaceanvim/config/server.lua @@ -54,7 +54,7 @@ function server.load_rust_analyzer_settings(project_root, opts) local json = require('rustaceanvim.config.json') local rust_analyzer_settings = json.silent_decode(content) local ra_key = 'rust-analyzer' - local has_ra_key = true + local has_ra_key = false for key, _ in pairs(rust_analyzer_settings) do if key:find(ra_key) ~= nil then has_ra_key = true