From 3e10e4ac811f4249c71c44267050a9eb3efa73fd Mon Sep 17 00:00:00 2001 From: jdhao Date: Thu, 5 Nov 2020 00:14:14 +0800 Subject: [PATCH] The correct setting for flake8 in pyls --- core/plugins.vim | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/core/plugins.vim b/core/plugins.vim index 15b4da1..f999a19 100644 --- a/core/plugins.vim +++ b/core/plugins.vim @@ -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 (miniyank-autoPut) """""""""""""""""""""""""""""" ale settings """"""""""""""""""""""" " linters for different filetypes let g:ale_linters = { - \ 'python': ['pylint'], \ 'vim': ['vint'], \ 'cpp': ['clang'], \ 'c': ['clang']