From 55a96e603cc3bcba5502461a6260692f0c032a2b Mon Sep 17 00:00:00 2001
From: Daniel Schadt <kingdread@gmx.de>
Date: Mon, 22 Nov 2021 11:23:03 +0100
Subject: add neomake, rust-tools and pylsp

---
 neovim/.config/nvim/init.vim | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

(limited to 'neovim')

diff --git a/neovim/.config/nvim/init.vim b/neovim/.config/nvim/init.vim
index 55a209e..e5b2933 100644
--- a/neovim/.config/nvim/init.vim
+++ b/neovim/.config/nvim/init.vim
@@ -68,6 +68,8 @@ Plug 'vim-airline/vim-airline-themes'
 Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
 Plug 'junegunn/fzf.vim'
 
+Plug 'neomake/neomake'
+
 " Pre-built configurations for the neovim LSP client
 Plug 'neovim/nvim-lspconfig'
 
@@ -127,6 +129,7 @@ Plug 'myusuf3/numbers.vim'
 
 " Official rust plugin
 Plug 'rust-lang/rust.vim'
+Plug 'simrat39/rust-tools.nvim'
 
 
 " Tell vim-plug we finished declaring plugins, so it can load them
@@ -222,15 +225,23 @@ end
 
 -- Use a loop to conveniently call 'setup' on multiple servers and
 -- map buffer local keybindings when the language server attaches
-local servers = { 'clangd', 'hls', 'rust_analyzer', 'texlab' }
+local servers = { 'clangd', 'hls', 'rust_analyzer', 'texlab', 'pylsp' }
 for _, lsp in ipairs(servers) do
-  nvim_lsp[lsp].setup {
+  local config = {
     on_attach = on_attach,
     flags = {
       debounce_text_changes = 150,
     },
     capabilities = require('cmp_nvim_lsp').update_capabilities(lsp_status.capabilities)
   }
+  if lsp == 'pylsp' then
+    config['cmd'] = { 'pyls' }
+  end
+  if lsp == 'rust_analyzer' then
+    require('rust-tools').setup({server = config})
+  else
+    nvim_lsp[lsp].setup(config)
+  end
 end
 
 EOF
-- 
cgit v1.2.3