diff options
author | Daniel Schadt <kingdread@gmx.de> | 2021-11-22 11:23:03 +0100 |
---|---|---|
committer | Daniel Schadt <kingdread@gmx.de> | 2021-11-22 11:23:03 +0100 |
commit | 55a96e603cc3bcba5502461a6260692f0c032a2b (patch) | |
tree | 19cc294bd3b30e156a812b90c1ff20df0898289f /neovim | |
parent | 09e8d2934a225851676c9fe60c47dcac9bb9135f (diff) | |
download | dotfiles-55a96e603cc3bcba5502461a6260692f0c032a2b.tar.gz dotfiles-55a96e603cc3bcba5502461a6260692f0c032a2b.tar.bz2 dotfiles-55a96e603cc3bcba5502461a6260692f0c032a2b.zip |
add neomake, rust-tools and pylsp
Diffstat (limited to 'neovim')
-rw-r--r-- | neovim/.config/nvim/init.vim | 15 |
1 files changed, 13 insertions, 2 deletions
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 |