46 lines
1.4 KiB
VimL
46 lines
1.4 KiB
VimL
setlocal ts=4
|
|
setlocal sts=4
|
|
setlocal sw=4
|
|
setlocal et
|
|
setlocal tw=80
|
|
setlocal colorcolumn=79
|
|
setlocal smartindent
|
|
setlocal autoindent
|
|
setlocal fileformat=unix
|
|
setlocal formatoptions+=croq
|
|
setlocal omnifunc=pythoncomplete#Complete
|
|
setlocal cinwords=if,elif,else,for,while,try,except,finally,def,class,with
|
|
|
|
augroup pystuff
|
|
autocmd!
|
|
autocmd BufEnter call ncm2#enable_for_buffer()
|
|
autocmd BufNewFile *.py 0r ~/.config/nvim/templates/py.skeleton
|
|
autocmd InsertEnter *.py Semshi pause
|
|
autocmd InsertLeave *.py Semshi enable
|
|
augroup END
|
|
|
|
nnoremap <buffer> <localleader>y :0,$!yapf<Cr>
|
|
nnoremap <buffer> <localleader>c I#<esc>
|
|
|
|
let g:LanguageClient_autoStart = 1
|
|
|
|
let g:ale_sign_column_always = 1
|
|
let g:ale_set_loclist = 0
|
|
let g:ale_set_quickfix = 1
|
|
let g:ale_sign_error = '✖︎ '
|
|
let g:ale_sign_warning = '> '
|
|
let g:ale_python_mypy_options = "--ignore-missing-imports"
|
|
let g:ale_python_pylint_options = "--disable=C"
|
|
let g:ale_python_flake8_options = "--ignore=E221"
|
|
let g:move_key_modifier = 'N'
|
|
let g:ale_lint_on_insert_leave = 1
|
|
let g:ale_lint_on_text_changed = 'never'
|
|
let g:ale_lint_on_enter = 1
|
|
let g:ale_lint_on_save = 1
|
|
|
|
" Check Python files with flake8 and pylint.
|
|
let b:ale_linters = ['flake8', 'pylint']
|
|
" Fix Python files with autopep8 and yapf.
|
|
let b:ale_fixers = ['autopep8', 'yapf']
|
|
" Disable warnings about trailing whitespace for Python files.
|
|
let b:ale_warn_about_trailing_whitespace = 0 |