From 24dffcb1bb54eafe7479731203ad8761f6c0713c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Wo=C5=BAniak?= Date: Sun, 28 Apr 2024 21:14:48 +0200 Subject: [PATCH] Added rust_analyzer --- .config/nvim/init.vim | 4 +++- .local/bin/Update-pkg | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 05784bb..45e09e9 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -207,7 +207,7 @@ local handlers = { -- Use a loop to conveniently call 'setup' on multiple servers and -- map buffer local keybindings when the language server attaches -local servers = { 'pyright', 'bashls', 'yamlls', 'ansiblels', 'gopls', 'solargraph', 'terraformls', 'tflint', 'marksman' } +local servers = { 'pyright', 'bashls', 'yamlls', 'ansiblels', 'gopls', 'solargraph', 'terraformls', 'tflint', 'marksman', 'rust_analyzer' } for _, lsp in pairs(servers) do require('lspconfig')[lsp].setup { on_attach = on_attach, @@ -340,6 +340,8 @@ require("nvim-tree").setup({ require'treesitter-context'.setup{} require("nvim-autopairs").setup {} + +require'lspconfig'.rust_analyzer.setup {} EOF " Added popout window to see diagnostic diff --git a/.local/bin/Update-pkg b/.local/bin/Update-pkg index 0ae0e59..c374cea 100755 --- a/.local/bin/Update-pkg +++ b/.local/bin/Update-pkg @@ -296,6 +296,7 @@ function install_kubernetes() { function install_rust() { if command_exists rustc; then rustup update + rustup component add rust-analyzer else curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh fi