From bfebbcac0bed4dfb1293414de7121396f919d3e0 Mon Sep 17 00:00:00 2001 From: Diego Ximenes Date: Sun, 11 Aug 2024 21:02:51 -0300 Subject: [PATCH] nvim: rust support --- config/nvim/lua/plugins/nvim-lspconfig.lua | 7 +++++++ packages/pkglist.txt | 1 + 2 files changed, 8 insertions(+) diff --git a/config/nvim/lua/plugins/nvim-lspconfig.lua b/config/nvim/lua/plugins/nvim-lspconfig.lua index ae2278a..98b7de4 100644 --- a/config/nvim/lua/plugins/nvim-lspconfig.lua +++ b/config/nvim/lua/plugins/nvim-lspconfig.lua @@ -60,6 +60,13 @@ return { }) end + local default_capabilities = require("cmp_nvim_lsp").default_capabilities() + lspconfig["rust_analyzer"].setup({ + on_attach = on_attach, + flags = flags, + capabilities = default_capabilities, + }) + lspconfig["clangd"].setup({ on_attach = on_attach, flags = flags, diff --git a/packages/pkglist.txt b/packages/pkglist.txt index 6e13077..bab986f 100644 --- a/packages/pkglist.txt +++ b/packages/pkglist.txt @@ -126,6 +126,7 @@ ripgrep rofi rsync ruby +rust-analyzer rustup s-nail sd