vimrc: add python settings

This commit is contained in:
surtur 2022-10-30 03:27:40 +01:00
parent 870f104638
commit 3ecd434e39
Signed by: wanderer
SSH Key Fingerprint: SHA256:MdCZyJ2sHLltrLBp0xQO0O1qTW9BT/xl5nXkDvhlMCI

@ -81,6 +81,7 @@ Plug 'adamheins/vim-highlight-match-under-cursor'
Plug 'roxma/nvim-yarp' Plug 'roxma/nvim-yarp'
Plug 'roxma/vim-hug-neovim-rpc' Plug 'roxma/vim-hug-neovim-rpc'
Plug 'Shougo/deoplete.nvim' Plug 'Shougo/deoplete.nvim'
Plug 'deoplete-plugins/deoplete-jedi', { 'for': ['python'] }
Plug 'prabirshrestha/async.vim' Plug 'prabirshrestha/async.vim'
Plug 'prabirshrestha/vim-lsp' Plug 'prabirshrestha/vim-lsp'
@ -683,6 +684,37 @@ augroup END
exec 'source ' . escape(expand('~/.vim'),' ') . '/' . 'gotags.vimrc.vim' exec 'source ' . escape(expand('~/.vim'),' ') . '/' . 'gotags.vimrc.vim'
""" python
" vim-python
augroup vimrc-python
autocmd!
autocmd FileType python setlocal expandtab shiftwidth=4 tabstop=8 colorcolumn=79
\ formatoptions+=croq softtabstop=4
\ cinwords=if,elif,else,for,while,try,except,finally,def,class,with
augroup END
" jedi-vim
let g:jedi#popup_on_dot = 0
let g:jedi#goto_assignments_command = '<leader>g'
let g:jedi#goto_definitions_command = '<leader>d'
let g:jedi#documentation_command = 'K'
let g:jedi#usages_command = '<leader>n'
let g:jedi#rename_command = '<leader>r'
let g:jedi#show_call_signatures = '0'
let g:jedi#completions_command = '<C-Space>'
let g:jedi#smart_auto_mappings = 0
" ale
:call extend(g:ale_linters, {
\'python': ['flake8'], })
" vim-airline
let g:airline#extensions#virtualenv#enabled = 1
" Syntax highlight
let python_highlight_all = 1
" ------ wayland copy and pasting " ------ wayland copy and pasting
let s:env = toupper(substitute(system('uname'), '\n', '', '')) let s:env = toupper(substitute(system('uname'), '\n', '', ''))
if s:env =~# 'LINUX' && executable('wl-copy') if s:env =~# 'LINUX' && executable('wl-copy')