From 29ad5b91bf1d53dd02cab3a18a82b2e81d0d8467 Mon Sep 17 00:00:00 2001 From: qwjyh Date: Sun, 23 Feb 2025 03:15:04 +0900 Subject: [PATCH] update(nvim): enable inlay hints in rust_analyzer and add cargo.features = "all" --- dotfiles/neovim/init.lua | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/dotfiles/neovim/init.lua b/dotfiles/neovim/init.lua index f6e2d1e..f577e28 100644 --- a/dotfiles/neovim/init.lua +++ b/dotfiles/neovim/init.lua @@ -769,15 +769,21 @@ lspconfig.tinymist.setup { } lspconfig.rust_analyzer.setup { - on_attach = on_attach, + on_attach = function(client, bufnr) + on_attach(client, bufnr) + vim.lsp.inlay_hint.enable(true, { bufnr = bufnr }) + end, capabilities = capabilities, settings = { ['rust-analyzer'] = { + cargo = { + features = "all", + }, check = { command = "clippy", - } - } - } + }, + }, + }, } local lss = { "pyright", "texlab", --[[ "ccls", ]] "clangd", "ts_ls", --[["tailwindcss"]] "hls", "cmake",