Add black formatting to vim
This commit is contained in:
parent
671f2625e5
commit
e0cc8e6795
@ -26,6 +26,7 @@ Plug 'vim-airline/vim-airline'
|
||||
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
|
||||
Plug 'junegunn/fzf.vim'
|
||||
Plug 'luochen1990/rainbow'
|
||||
Plug 'psf/black'
|
||||
" Themes
|
||||
Plug 'crusoexia/vim-monokai'
|
||||
" Language specific
|
||||
@ -35,9 +36,11 @@ call plug#end()
|
||||
" ale: apt install pylint flake8
|
||||
|
||||
" Ale
|
||||
let g:ale_linters = {
|
||||
\ 'python': ['flake8', 'pylint'],
|
||||
\}
|
||||
let g:ale_linters = {'python': ['flake8', 'pylint'],}
|
||||
let g:ale_fixers = {}
|
||||
let g:ale_fixers.python = ['black']
|
||||
|
||||
let g:black_linelength = 80
|
||||
|
||||
" NERDTREE
|
||||
" open nerdtree when no file is specified on startup
|
||||
@ -45,6 +48,7 @@ autocmd StdinReadPre * let s:std_in=1
|
||||
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
|
||||
" toggle nerdtree keyboard shortcut
|
||||
map <C-t> :NERDTreeToggle<CR>
|
||||
nnoremap <F9> :Black<CR>
|
||||
|
||||
" RAINBOW_PARENTHESES
|
||||
au FileType c,cpp,py call rainbow#load()
|
||||
|
@ -7,6 +7,7 @@
|
||||
apt:
|
||||
name:
|
||||
- ack
|
||||
- black # code formatting
|
||||
- feh # set background
|
||||
- fish
|
||||
- fzf
|
||||
@ -18,6 +19,7 @@
|
||||
- nitrogen
|
||||
- pass
|
||||
- polybar
|
||||
- python3-pylint-common
|
||||
- pulseaudio-utils # pactl volume control
|
||||
- rofi # dmenu replacement
|
||||
- scrot # screenshot
|
||||
|
Loading…
x
Reference in New Issue
Block a user