[nvim] move the flake8 config to an external file
This commit is contained in:
parent
f8c01686ee
commit
c12afbc6ff
|
@ -1,19 +1,6 @@
|
||||||
let g:coc_global_extensions += ['coc-pyright']
|
let g:coc_global_extensions += ['coc-pyright']
|
||||||
let g:coc_filetypes += ['python']
|
let g:coc_filetypes += ['python']
|
||||||
|
|
||||||
let s:ignored_errors = []
|
|
||||||
" Indent is not a multiple of 4
|
|
||||||
let s:ignored_errors += ['E111']
|
|
||||||
" Indent is not a multiple of 4 for comments
|
|
||||||
let s:ignored_errors += ['E114']
|
|
||||||
" Indent for continuation lines is smaller than expected
|
|
||||||
let s:ignored_errors += ['E121']
|
|
||||||
" Import not at the top of the file
|
|
||||||
let s:ignored_errors += ['E402']
|
|
||||||
" Line too long
|
|
||||||
let s:ignored_errors += ['E501']
|
|
||||||
|
|
||||||
" let g:coc_user_config['pyls.plugins.pycodestyle.ignore'] = s:ignored_errors
|
|
||||||
" let g:coc_user_config['python.autocomplete.showAdvancedMembers'] = v:false
|
" let g:coc_user_config['python.autocomplete.showAdvancedMembers'] = v:false
|
||||||
let g:coc_user_config['python'] = {
|
let g:coc_user_config['python'] = {
|
||||||
\ 'formatting': {
|
\ 'formatting': {
|
||||||
|
@ -23,6 +10,6 @@ let g:coc_user_config['python'] = {
|
||||||
\ 'linting': {
|
\ 'linting': {
|
||||||
\ 'pylintEnabled': v:false,
|
\ 'pylintEnabled': v:false,
|
||||||
\ 'flake8Enabled': v:true,
|
\ 'flake8Enabled': v:true,
|
||||||
\ 'flake8Args': ['--ignore=' . join(s:ignored_errors, ',')],
|
\ 'flake8Args': ['--config=' . simplify(g:nvim_dotfiles_dir.'/../python/flake8.ini')],
|
||||||
\ },
|
\ },
|
||||||
\ }
|
\ }
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
[flake8]
|
||||||
|
ignore =
|
||||||
|
# Indent is not a multiple of 4
|
||||||
|
E111
|
||||||
|
# Indent is not a multiple of 4 for comments
|
||||||
|
E114
|
||||||
|
# Indent for continuation lines is smaller than expected
|
||||||
|
E121
|
||||||
|
# Import not at the top of the file
|
||||||
|
E402
|
||||||
|
# Line too long
|
||||||
|
E501
|
Loading…
Reference in New Issue