Disable pylsp long line warning

This commit is contained in:
Augusto Gunsch 2021-11-27 10:52:52 -03:00
parent 5902489017
commit 3695cf1f99
No known key found for this signature in database
GPG Key ID: F7EEFE29825C72DC
1 changed files with 20 additions and 4 deletions

View File

@ -122,7 +122,7 @@ local default_attach = function(client, bufnr)
end end
local setup = function(lsp, on_attach, options) local setup = function(lsp, on_attach, settings)
local nvim_lsp = require('lspconfig') local nvim_lsp = require('lspconfig')
nvim_lsp[lsp].setup { nvim_lsp[lsp].setup {
@ -130,20 +130,36 @@ local setup = function(lsp, on_attach, options)
flags = { flags = {
debounce_text_changes = 150, debounce_text_changes = 150,
}, },
options=options settings=settings
} }
end end
-- Use a loop to conveniently call 'setup' on multiple servers and -- Use a loop to conveniently call 'setup' on multiple servers and
-- map buffer local keybindings when the language server attaches -- 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 for _, lsp in ipairs(servers) do
setup(lsp, default_attach) setup(lsp, default_attach)
end end
-- Servers with custom setup -- 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 EOF