From c0046ebe68ae20bd6eb8511497c8a359defc5680 Mon Sep 17 00:00:00 2001 From: marshmallow Date: Sun, 21 Dec 2025 08:33:37 +1100 Subject: [PATCH] update rust-analyzer options for leptos --- candy/ftplugin/rust.lua | 11 ----------- candy/lua/marshmallow/init.lua | 1 + candy/lua/marshmallow/lsp.lua | 28 ++++++++++++++++++++++++++++ 3 files changed, 29 insertions(+), 11 deletions(-) diff --git a/candy/ftplugin/rust.lua b/candy/ftplugin/rust.lua index c4a6af8..b06f20c 100644 --- a/candy/ftplugin/rust.lua +++ b/candy/ftplugin/rust.lua @@ -1,14 +1,3 @@ --- I just like having it seperated by ft even if its not heavy -vim.g.rustaceanvim = { - tools = {}, - server = { - settings = { - ["rust-analyzer"] = {}, - }, - }, - dap = {}, -} - vim.keymap.set("n", "gra", function() vim.cmd.RustLsp("codeAction") end, { buffer = true, silent = true }) diff --git a/candy/lua/marshmallow/init.lua b/candy/lua/marshmallow/init.lua index 5c0fe7f..ea05416 100644 --- a/candy/lua/marshmallow/init.lua +++ b/candy/lua/marshmallow/init.lua @@ -1,3 +1,4 @@ +-- I just like having it seperated by ft even if its not heavy require("marshmallow.colorscheme") require("marshmallow.defaults") require("marshmallow.statusline") diff --git a/candy/lua/marshmallow/lsp.lua b/candy/lua/marshmallow/lsp.lua index e176bb8..9b72077 100644 --- a/candy/lua/marshmallow/lsp.lua +++ b/candy/lua/marshmallow/lsp.lua @@ -1,3 +1,31 @@ +vim.g.rustaceanvim = { + tools = {}, + server = { + settings = { + ["rust-analyzer"] = { + diagnostics = { + enable = true, + disabled = { "proc-macro-disabled" }, + enableExperimental = true, + }, + + procMacro = { + ignored = { + leptos_macro = { + "component", + "server", + }, + }, + }, + cargo = { + features = "all", -- Run against all crate features + }, + }, + }, + }, + dap = {}, +} + require("fidget").setup({}) local group = vim.api.nvim_create_augroup("marsh-lsp", {}) -- 2.51.2