From 8ddbd88a633894f7cb411e6c16bac232ce30b179 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Wed, 1 Dec 2021 21:10:16 +0100 Subject: Added python lsp for neovim (with flake8 integration) --- config/nvim/lua/plugins.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/config/nvim/lua/plugins.lua b/config/nvim/lua/plugins.lua index 652c1c6..6b57eee 100644 --- a/config/nvim/lua/plugins.lua +++ b/config/nvim/lua/plugins.lua @@ -11,9 +11,14 @@ return require('packer').startup(function() -- nvim lsp configuration use { 'neovim/nvim-lspconfig', + ft = {'rust', 'python', 'c', 'cpp'}, config = function() - require('lspconfig').clangd.setup {} - end + local lspconfig = require('lspconfig') + lspconfig.clangd.setup {} + -- need python-lsp-server and pyls-flake8 + lspconfig.pylsp.setup {} + end, + run = 'pip3 install python-lsp-server pyls-flake8', } -- rust lsp (needs rust-analyser) -- cgit