From d3500a4a33ab87c6225d991302a72012c54b26fe Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 27 May 2024 08:09:24 +0200 Subject: [PATCH] fix(rust): show error when rust-analyzer not found --- lua/lazyvim/plugins/extras/lang/rust.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lua/lazyvim/plugins/extras/lang/rust.lua b/lua/lazyvim/plugins/extras/lang/rust.lua index 3c2710df..5a3c59d7 100644 --- a/lua/lazyvim/plugins/extras/lang/rust.lua +++ b/lua/lazyvim/plugins/extras/lang/rust.lua @@ -90,6 +90,12 @@ return { }, config = function(_, opts) vim.g.rustaceanvim = vim.tbl_deep_extend("keep", vim.g.rustaceanvim or {}, opts or {}) + if vim.fn.executable("rust-analyzer") == 0 then + LazyVim.error( + "**rust-analyzer** not found in PATH, please install it.\nhttps://rust-analyzer.github.io/", + { title = "rustaceanvim" } + ) + end end, },