1
0
mirror of https://github.com/jdhao/nvim-config.git synced 2025-06-08 14:14:33 +02:00

The correct setting for flake8 in pyls

This commit is contained in:
jdhao 2020-11-05 00:14:14 +08:00
parent 74e9290cb0
commit 3e10e4ac81

View File

@ -364,10 +364,18 @@ let g:lsp_preview_max_width = 80
if executable('pyls')
" pip install python-language-server
au User lsp_setup call lsp#register_server({
\ 'name': 'pyls',
\ 'cmd': {server_info->['pyls']},
\ 'allowlist': ['python'],
\ })
\ 'name': 'pyls',
\ 'cmd': {server_info->['pyls']},
\ 'allowlist': ['python'],
\ 'workspace_config': {
\ 'pyls':
\ {'configurationSources': ['flake8'],
\ 'plugins': {'flake8': {'enabled': v:true},
\ 'pyflakes': {'enabled': v:false},
\ 'pycodestyle': {'enabled': v:false},
\ }
\ }
\ }})
endif
if executable('vim-language-server')
@ -612,7 +620,6 @@ nmap P <Plug>(miniyank-autoPut)
"""""""""""""""""""""""""""""" ale settings """""""""""""""""""""""
" linters for different filetypes
let g:ale_linters = {
\ 'python': ['pylint'],
\ 'vim': ['vint'],
\ 'cpp': ['clang'],
\ 'c': ['clang']