From 259f881c6bea51338e5ff72fc3a366008013c8c6 Mon Sep 17 00:00:00 2001 From: Marc Jakobi Date: Fri, 22 Dec 2023 16:44:53 +0100 Subject: [PATCH] fix(health): only error if `lspconfig.rust_analyzer` has been setup --- CHANGELOG.md | 7 +++++++ lua/rustaceanvim/health.lua | 7 ++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3abecccd..e5c5b4a6 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). +## [3.10.5] - 2023-12-22 + +### Fixed + +- Health: Only report error if `lspconfig.rust_analyzer` has been setup, + not other lspconfig configurations. + ## [3.10.4] - 2023-12-20 ### Fixed diff --git a/lua/rustaceanvim/health.lua b/lua/rustaceanvim/health.lua index ab696be3..093a06a3 100644 --- a/lua/rustaceanvim/health.lua +++ b/lua/rustaceanvim/health.lua @@ -114,7 +114,12 @@ end local function check_for_conflicts() start('Checking for conflicting plugins') for _, autocmd in ipairs(vim.api.nvim_get_autocmds { event = 'FileType', pattern = 'rust' }) do - if autocmd.group_name and autocmd.group_name == 'lspconfig' then + if + autocmd.group_name + and autocmd.group_name == 'lspconfig' + and autocmd.desc + and autocmd.desc:match('rust_analyzer') + then error( 'lspconfig.rust_analyzer has been setup. This will likely lead to conflicts with the rustaceanvim LSP client.' )