diff --git a/.netrwhist b/.netrwhist index 162a1c0..113b71b 100644 --- a/.netrwhist +++ b/.netrwhist @@ -1,5 +1,8 @@ let g:netrw_dirhistmax =10 -let g:netrw_dirhistcnt =7 +let g:netrw_dirhistcnt =0 +let g:netrw_dirhist_0='/home/leon/coding/projects/eww/src' +let g:netrw_dirhist_9='/home/leon/.config/polybar' +let g:netrw_dirhist_8='/home/leon/coding/plover-plugins/plover_retro_surround' let g:netrw_dirhist_7='/home/leon/coding/plover-plugins/plover_retro_surround/plover_retro_surround.egg-info' let g:netrw_dirhist_6='/home/leon/.config/coc/extensions' let g:netrw_dirhist_5='/home/leon/.config/elkowar_phocus' @@ -7,6 +10,3 @@ let g:netrw_dirhist_4='/home/leon/coding/projects/eww/docs' let g:netrw_dirhist_3='/home/leon/tmp/test/content' let g:netrw_dirhist_2='/home/leon/desktop-dotfiles/files/.config' let g:netrw_dirhist_1='/home/leon/desktop-dotfiles/files/.config/eww' -let g:netrw_dirhist_0='/home/leon/.config/eww' -let g:netrw_dirhist_9='/home/leon/.config' -let g:netrw_dirhist_8='/home/leon/coding/projects/eww/src' diff --git a/init.vim b/init.vim index 48fe26e..b2ce090 100644 --- a/init.vim +++ b/init.vim @@ -1,4 +1,3 @@ - " __ _(_)_ __ ___ _ __ ___ " \ \ / / | '_ ` _ \| '__/ __| " \ V /| | | | | | | | | (__ @@ -7,6 +6,7 @@ let g:vim_config_root = expand(':p:h') let $VIM_ROOT = g:vim_config_root +let g:vimspector_enable_mappings = 'HUMAN' source $VIM_ROOT/plugins.vim @@ -18,6 +18,8 @@ endif let mapleader ="\" +let g:signify_sign_show_text = 1 + " Vanilla VIM configuration ------------------------------------ {{{ @@ -70,7 +72,7 @@ highlight EndOfBuffer ctermfg=black ctermbg=black hi NormalFloat ctermbg=black guibg='#1d2021' hi Pmenu ctermbg=black guibg='#1d2021' -hi SignColumn ctermbg=black guibg='#282828' +hi SignColumn ctermbg=NONE guibg='#282828' hi WhichKeyFloating ctermbg=black guibg='#282828' hi link Function GruvboxGreen @@ -159,6 +161,7 @@ nmap Sneak_S omap Sneak_s omap Sneak_S + " FZF showing previews command! -bang -nargs=? -complete=dir Files \ call fzf#vim#files(, fzf#vim#with_preview({'options': ['--layout=reverse', '--info=inline']}), 0) @@ -182,7 +185,11 @@ map f (easymotion-bd-f) map s (easymotion-overwin-f2) let g:EasyMotion_smartcase = 1 -let g:signify_sign_delete = '-' +let g:signify_sign_add = '▍' +let g:signify_sign_delete = '▍' +let g:signify_sign_delete_first_line = '▍' +let g:signify_sign_change = '▍' + " Airline {{{ @@ -211,11 +218,10 @@ autocmd BufWinEnter * :hi airline_tablabel_right ctermbg=NONE guibg=NONE ctermfg " }}} -source $VIM_ROOT/whichkeyConfig.vim -source $VIM_ROOT/lsp.vim + " }}} - +" :: and _ as space {{{ function RebindShit(newKey) let b:RemappedSpace={ \ 'old': maparg("", "i"), @@ -248,3 +254,17 @@ inoremap k :call RebindShit("::") nnoremap ö a + + +" }}} + + +hi SignifyLineDelete cterm=NONE gui=NONE guifg='#ff0000' +hi SignifyLineChange cterm=NONE gui=NONE guifg='#ff0000' + +hi SignifyLineAdd cterm=NONE gui=NONE guifg='#ff0000' + + +source $VIM_ROOT/whichkeyConfig.vim +source $VIM_ROOT/lsp.vim + diff --git a/lsp.vim b/lsp.vim index c890ae0..f56c068 100644 --- a/lsp.vim +++ b/lsp.vim @@ -14,28 +14,11 @@ au Syntax * RainbowParenthesesLoadSquare au Syntax * RainbowParenthesesLoadBraces -" Use for trigger snippet expand. -imap (coc-snippets-expand) - -" Use for select text for visual placeholder of snippet. -vmap (coc-snippets-select) - -" Use for jump to next placeholder, it's default of coc.nvim -let g:coc_snippet_next = '' - -" Use for jump to previous placeholder, it's default of coc.nvim -let g:coc_snippet_prev = '' - -" Use for both expand and jump (make expand higher priority.) -imap (coc-snippets-expand-jump) - -" Use x for convert visual selected code to snippet -xmap x (coc-convert-snippet) - let g:coc_global_extensions = [ \ 'coc-yank', 'coc-vimlsp', 'coc-prettier', 'coc-eslint', \ 'coc-diagnostic', 'coc-yaml', 'coc-tsserver', - \ 'coc-json', 'coc-go', 'coc-html', 'coc-css', 'coc-clangd' + \ 'coc-json', 'coc-go', 'coc-html', 'coc-css', 'coc-clangd', + \ 'coc-actions' \ ] " 'coc-rust-analyzer', @@ -72,11 +55,6 @@ function! Show_documentation() endif endfunction -function! s:check_back_space() abort - let col = col('.') - 1 - return !col || getline('.')[col - 1] =~# '\s' -endfunction - " Show all diagnostics. function! s:check_back_space() abort @@ -109,3 +87,29 @@ hi CocWarningHighlight ctermfg=yellow guifg=#c4ab39 gui=undercurl term=undercurl autocmd CursorHold * silent call CocActionAsync('highlight') autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp') + +" Snippet stuff {{{ + + +" Use for trigger snippet expand. +imap (coc-snippets-expand) + +" Use for select text for visual placeholder of snippet. +vmap (coc-snippets-select) + +" Use for jump to next placeholder, it's default of coc.nvim +let g:coc_snippet_next = '' + +" Use for jump to previous placeholder, it's default of coc.nvim +let g:coc_snippet_prev = '' + +" Use for both expand and jump (make expand higher priority.) +imap (coc-snippets-expand-jump) + +" Use x for convert visual selected code to snippet +xmap x (coc-convert-snippet) + +" }}} + + + diff --git a/plugins.vim b/plugins.vim index 22c6d2d..c6eb5a6 100644 --- a/plugins.vim +++ b/plugins.vim @@ -6,9 +6,6 @@ endif call plug#begin('~/.vim/plugged') - -Plug 'branwright1/salvation-vim' - Plug 'tpope/vim-repeat' Plug 'junegunn/goyo.vim', {'on': 'Goyo'} @@ -55,8 +52,6 @@ Plug 'branwright1/salvation-vim' Plug 'jiangmiao/auto-pairs' - Plug 'junegunn/vim-peekaboo' " highlight jump points (f, t) - Plug 'machakann/vim-highlightedyank' Plug 'ciaranm/detectindent' @@ -71,7 +66,13 @@ Plug 'branwright1/salvation-vim' Plug 'liuchengxu/vista.vim' + Plug 'antoinemadec/coc-fzf' + Plug 'tommcdo/vim-exchange' + + Plug 'puremourning/vimspector' + + Plug 'svermeulen/vim-yoink' " Language Plugins ----------------------------------------------------- {{{ "Plug 'satabin/hocon-vim' diff --git a/whichkeyConfig.vim b/whichkeyConfig.vim index ed898e4..b24c2cd 100644 --- a/whichkeyConfig.vim +++ b/whichkeyConfig.vim @@ -4,13 +4,18 @@ let g:which_key_map = {} call which_key#register('', "g:which_key_map") + + + let g:which_key_map = { \ 'h' : 'which_key_ignore', 'l' : 'which_key_ignore', \ 'f' : 'which_key_ignore', 's': 'which_key_ignore' , \ 'c' : { 'name': '+comment_out' }, \ 'e' : { 'name': '+emmet' }, + \ '[' : ['(YoinkPostPasteSwapBack)', 'Swap last paste backwards' ], + \ ']' : ['(YoinkPostPasteSwapForward)', 'Swap last paste backwards' ], \ 'z' : { 'name': '+folds', 'c': ['foldclose', 'close fold'], - \ 'o': ['foldopen', 'open fold'] , + \ 'o': ['foldopen', 'open fold'] , \ } \ } @@ -19,9 +24,9 @@ let g:which_key_map = { let g:which_key_map['m'] = { \ 'name' : '+Code-actions' , \ 'd' : [ ':call Show_documentation()' , 'show documentation' ] , - \ 's' : [ ':CocList -I symbols' , 'list symbols' ] , - \ 'o' : [ ':CocList outline' , 'show outline' ] , - \ 'c' : [ ':CocList commands' , 'show all coc-commands' ] , + \ 's' : [ ':CocFzfList symbols' , 'list symbols' ] , + \ 'o' : [ ':CocFzfList outline' , 'show outline' ] , + \ 'c' : [ ':CocFzfList commands' , 'show all coc-commands' ] , \ 'g' : [ '(coc-definition)' , 'go to definition' ] , \ 't' : [ '(coc-type-definition)' , 'show type definition' ] , \ 'i' : [ '(coc-implementation)' , 'show implementation' ] , @@ -60,7 +65,7 @@ let g:which_key_map['v'] = { let g:which_key_map['b'] = { \ 'name': '+buffers' , - \ 'o' : ['Buffers' , 'select open buffer' ] , + \ 'b' : ['Buffers' , 'select open buffer' ] , \ 'c' : [':bdelete!' , 'close open buffer' ] , \ 'w' : [':bwipeout!' , 'wipeout open buffer' ] , \ } @@ -72,7 +77,7 @@ let g:which_key_map['x'] = { \ 'h' : [':History:' , 'search command history'], \ 'c' : [':Commands' , 'search through commands'], \ 's' : ['OverCommandLine', 'Substitute with preview'], - \ 'y' : [':CocList -A --normal yank', 'Show yank history'] + \ 'y' : [':CocFzfList -A --normal yank', 'Show yank history'] \ } " CocList -A --normal yank needs :CocInstall coc-yank