1
0
mirror of https://git.decapod.one/brethil/dotfiles synced 2024-11-22 11:31:30 +01:00

vim: add git gutter line highlight toggle <leader>L shortcut

This commit is contained in:
bretello 2020-04-27 14:25:40 +02:00
parent b0f343cd27
commit 704b145bc4

View File

@ -9,14 +9,17 @@ colorscheme twilight256
set mouse=a relativenumber number foldmethod=indent nofoldenable "without nofoldenable all folds are closed at startup" set mouse=a relativenumber number foldmethod=indent nofoldenable "without nofoldenable all folds are closed at startup"
set ttymouse=xterm2 " fix mouse when used in tmux/byobu https://unix.stackexchange.com/q/50733 set ttymouse=xterm2 " fix mouse when used in tmux/byobu https://unix.stackexchange.com/q/50733
set clipboard=unnamed " always use system clipboard
set splitbelow splitright set splitbelow splitright
set autoread set autoread
set nowrap set nowrap
set showtabline=2 laststatus=2 " fix statusline set showtabline=2 laststatus=2 " fix statusline (FIX WHAT???)
" ALE configuration " ALE configuration
let g:ale_fixers_aliases = {'vue': ['vue', 'javascript']} let g:ale_fixers_aliases = {'vue': ['vue', 'javascript']}
" let g:ale_fixers = {
" \ '*': ['remove_trailing_lines', 'trim_whitespace'],
let g:ale_fixers = { let g:ale_fixers = {
\ '*': ['remove_trailing_lines', 'trim_whitespace'], \ '*': ['remove_trailing_lines', 'trim_whitespace'],
\ 'bash': ['shfmt'], \ 'bash': ['shfmt'],
@ -29,6 +32,8 @@ let g:ale_fixers = {
\ "javascript": ["prettier", "eslint"], \ "javascript": ["prettier", "eslint"],
\ "vue": ["prettier", "eslint"] \ "vue": ["prettier", "eslint"]
\} \}
let g:ale_python_bandit_options = "-c banditrc"
let g:ale_linter_aliases = {'vue': ['vue', 'javascript']} let g:ale_linter_aliases = {'vue': ['vue', 'javascript']}
let g:ale_linters = { let g:ale_linters = {
\ 'python': ['pyls', 'pylint', 'mypy', 'bandit'], \ 'python': ['pyls', 'pylint', 'mypy', 'bandit'],
@ -43,7 +48,7 @@ let g:ale_lint_on_insert_leave = 1
let g:ale_fix_on_insert_leave = 1 let g:ale_fix_on_insert_leave = 1
let g:ale_lint_on_text_changed = 1 let g:ale_lint_on_text_changed = 1
let g:ack_default_options = " --cc --cpp --shell --python --html --js" let g:ack_default_options = " --cc --cpp --shell --python --html --js --vue"
let g:ale_set_quickfix=1 let g:ale_set_quickfix=1
let g:ale_set_loclist=0 let g:ale_set_loclist=0
@ -142,6 +147,7 @@ nnoremap <leader>G :Git
nnoremap <leader>P :GPush<CR> nnoremap <leader>P :GPush<CR>
nnoremap <leader>M :Git commit<CR> nnoremap <leader>M :Git commit<CR>
nnoremap <leader>u :GitGutterBufferToggle<CR> nnoremap <leader>u :GitGutterBufferToggle<CR>
nnoremap <leader>L :GitGutterLineHighlightsToggle<CR>
" OR map keys to use wrapping. " OR map keys to use wrapping.
nmap <silent> <C-k> <Plug>(ale_previous_wrap) nmap <silent> <C-k> <Plug>(ale_previous_wrap)
@ -160,3 +166,6 @@ nmap <leader>st :ALEGoToDefinitionInTab<CR>
nmap <leader>A :ALEGoToDefinition<CR> nmap <leader>A :ALEGoToDefinition<CR>
nmap <leader>n :ALEFindReferences<CR> nmap <leader>n :ALEFindReferences<CR>
nmap <leader>r :ALERename<CR> nmap <leader>r :ALERename<CR>
set rtp+=/usr/local/opt/fzf