From 3695cf1f999c761a0ee30f3adb2d09c605c5390a Mon Sep 17 00:00:00 2001 From: Augusto Gunsch Date: Sat, 27 Nov 2021 10:52:52 -0300 Subject: [PATCH] Disable pylsp long line warning --- config/nvim/init.vim | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/config/nvim/init.vim b/config/nvim/init.vim index da2fecc..1a51810 100644 --- a/config/nvim/init.vim +++ b/config/nvim/init.vim @@ -122,7 +122,7 @@ local default_attach = function(client, bufnr) end -local setup = function(lsp, on_attach, options) +local setup = function(lsp, on_attach, settings) local nvim_lsp = require('lspconfig') nvim_lsp[lsp].setup { @@ -130,20 +130,36 @@ local setup = function(lsp, on_attach, options) flags = { debounce_text_changes = 150, }, - options=options + settings=settings } end -- Use a loop to conveniently call 'setup' on multiple servers and -- map buffer local keybindings when the language server attaches -local servers = { 'pylsp', 'clangd', 'rls', 'tsserver' } +local servers = { 'clangd', 'rls', 'tsserver' } for _, lsp in ipairs(servers) do setup(lsp, default_attach) end -- Servers with custom setup --- placeholder +-- pylsp +local attach_pylsp = function(client, bufnr) + common_bindings(client, bufnr) + +end + +local pylsp_settings = { + pylsp = { + plugins = { + pycodestyle = { + ignore = {'E501'} + } + } + } +} + +setup('pylsp', attach_pylsp, pylsp_settings) EOF