mirror of
https://github.com/elkowar/dots-of-war.git
synced 2024-12-25 13:42:23 +00:00
asdf
This commit is contained in:
parent
f9f9414418
commit
38948c1104
5 changed files with 75 additions and 45 deletions
|
@ -1,5 +1,8 @@
|
||||||
let g:netrw_dirhistmax =10
|
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_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_6='/home/leon/.config/coc/extensions'
|
||||||
let g:netrw_dirhist_5='/home/leon/.config/elkowar_phocus'
|
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_3='/home/leon/tmp/test/content'
|
||||||
let g:netrw_dirhist_2='/home/leon/desktop-dotfiles/files/.config'
|
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_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'
|
|
||||||
|
|
32
init.vim
32
init.vim
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
" __ _(_)_ __ ___ _ __ ___
|
" __ _(_)_ __ ___ _ __ ___
|
||||||
" \ \ / / | '_ ` _ \| '__/ __|
|
" \ \ / / | '_ ` _ \| '__/ __|
|
||||||
" \ V /| | | | | | | | | (__
|
" \ V /| | | | | | | | | (__
|
||||||
|
@ -7,6 +6,7 @@
|
||||||
let g:vim_config_root = expand('<sfile>:p:h')
|
let g:vim_config_root = expand('<sfile>:p:h')
|
||||||
let $VIM_ROOT = g:vim_config_root
|
let $VIM_ROOT = g:vim_config_root
|
||||||
|
|
||||||
|
let g:vimspector_enable_mappings = 'HUMAN'
|
||||||
|
|
||||||
source $VIM_ROOT/plugins.vim
|
source $VIM_ROOT/plugins.vim
|
||||||
|
|
||||||
|
@ -18,6 +18,8 @@ endif
|
||||||
let mapleader ="\<Space>"
|
let mapleader ="\<Space>"
|
||||||
|
|
||||||
|
|
||||||
|
let g:signify_sign_show_text = 1
|
||||||
|
|
||||||
|
|
||||||
" Vanilla VIM configuration ------------------------------------ {{{
|
" Vanilla VIM configuration ------------------------------------ {{{
|
||||||
|
|
||||||
|
@ -70,7 +72,7 @@ highlight EndOfBuffer ctermfg=black ctermbg=black
|
||||||
|
|
||||||
hi NormalFloat ctermbg=black guibg='#1d2021'
|
hi NormalFloat ctermbg=black guibg='#1d2021'
|
||||||
hi Pmenu 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 WhichKeyFloating ctermbg=black guibg='#282828'
|
||||||
hi link Function GruvboxGreen
|
hi link Function GruvboxGreen
|
||||||
|
|
||||||
|
@ -159,6 +161,7 @@ nmap <S-DEL> <Plug>Sneak_S
|
||||||
omap <DEL> <Plug>Sneak_s
|
omap <DEL> <Plug>Sneak_s
|
||||||
omap <S-DEL> <Plug>Sneak_S
|
omap <S-DEL> <Plug>Sneak_S
|
||||||
|
|
||||||
|
|
||||||
" FZF showing previews
|
" FZF showing previews
|
||||||
command! -bang -nargs=? -complete=dir Files
|
command! -bang -nargs=? -complete=dir Files
|
||||||
\ call fzf#vim#files(<q-args>, fzf#vim#with_preview({'options': ['--layout=reverse', '--info=inline']}), <bang>0)
|
\ call fzf#vim#files(<q-args>, fzf#vim#with_preview({'options': ['--layout=reverse', '--info=inline']}), <bang>0)
|
||||||
|
@ -182,7 +185,11 @@ map <Leader>f <Plug>(easymotion-bd-f)
|
||||||
map <Leader>s <Plug>(easymotion-overwin-f2)
|
map <Leader>s <Plug>(easymotion-overwin-f2)
|
||||||
let g:EasyMotion_smartcase = 1
|
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 {{{
|
" 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)
|
function RebindShit(newKey)
|
||||||
let b:RemappedSpace={
|
let b:RemappedSpace={
|
||||||
\ 'old': maparg("<Space>", "i"),
|
\ 'old': maparg("<Space>", "i"),
|
||||||
|
@ -248,3 +254,17 @@ inoremap <Tab>k <space><C-o>:call RebindShit("::")<CR>
|
||||||
|
|
||||||
|
|
||||||
nnoremap ö a
|
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
|
||||||
|
|
||||||
|
|
52
lsp.vim
52
lsp.vim
|
@ -14,28 +14,11 @@ au Syntax * RainbowParenthesesLoadSquare
|
||||||
au Syntax * RainbowParenthesesLoadBraces
|
au Syntax * RainbowParenthesesLoadBraces
|
||||||
|
|
||||||
|
|
||||||
" Use <C-l> for trigger snippet expand.
|
|
||||||
imap <C-l> <Plug>(coc-snippets-expand)
|
|
||||||
|
|
||||||
" Use <C-j> for select text for visual placeholder of snippet.
|
|
||||||
vmap <C-j> <Plug>(coc-snippets-select)
|
|
||||||
|
|
||||||
" Use <C-j> for jump to next placeholder, it's default of coc.nvim
|
|
||||||
let g:coc_snippet_next = '<c-j>'
|
|
||||||
|
|
||||||
" Use <C-k> for jump to previous placeholder, it's default of coc.nvim
|
|
||||||
let g:coc_snippet_prev = '<c-k>'
|
|
||||||
|
|
||||||
" Use <C-j> for both expand and jump (make expand higher priority.)
|
|
||||||
imap <C-j> <Plug>(coc-snippets-expand-jump)
|
|
||||||
|
|
||||||
" Use <leader>x for convert visual selected code to snippet
|
|
||||||
xmap <leader>x <Plug>(coc-convert-snippet)
|
|
||||||
|
|
||||||
let g:coc_global_extensions = [
|
let g:coc_global_extensions = [
|
||||||
\ 'coc-yank', 'coc-vimlsp', 'coc-prettier', 'coc-eslint',
|
\ 'coc-yank', 'coc-vimlsp', 'coc-prettier', 'coc-eslint',
|
||||||
\ 'coc-diagnostic', 'coc-yaml', 'coc-tsserver',
|
\ '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',
|
" 'coc-rust-analyzer',
|
||||||
|
|
||||||
|
@ -72,11 +55,6 @@ function! Show_documentation()
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:check_back_space() abort
|
|
||||||
let col = col('.') - 1
|
|
||||||
return !col || getline('.')[col - 1] =~# '\s'
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
|
|
||||||
" Show all diagnostics.
|
" Show all diagnostics.
|
||||||
function! s:check_back_space() abort
|
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 CursorHold * silent call CocActionAsync('highlight')
|
||||||
autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp')
|
autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp')
|
||||||
|
|
||||||
|
|
||||||
|
" Snippet stuff {{{
|
||||||
|
|
||||||
|
|
||||||
|
" Use <C-l> for trigger snippet expand.
|
||||||
|
imap <C-l> <Plug>(coc-snippets-expand)
|
||||||
|
|
||||||
|
" Use <C-j> for select text for visual placeholder of snippet.
|
||||||
|
vmap <C-j> <Plug>(coc-snippets-select)
|
||||||
|
|
||||||
|
" Use <C-j> for jump to next placeholder, it's default of coc.nvim
|
||||||
|
let g:coc_snippet_next = '<c-j>'
|
||||||
|
|
||||||
|
" Use <C-k> for jump to previous placeholder, it's default of coc.nvim
|
||||||
|
let g:coc_snippet_prev = '<c-k>'
|
||||||
|
|
||||||
|
" Use <C-j> for both expand and jump (make expand higher priority.)
|
||||||
|
imap <C-j> <Plug>(coc-snippets-expand-jump)
|
||||||
|
|
||||||
|
" Use <leader>x for convert visual selected code to snippet
|
||||||
|
xmap <leader>x <Plug>(coc-convert-snippet)
|
||||||
|
|
||||||
|
" }}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
11
plugins.vim
11
plugins.vim
|
@ -6,9 +6,6 @@ endif
|
||||||
|
|
||||||
|
|
||||||
call plug#begin('~/.vim/plugged')
|
call plug#begin('~/.vim/plugged')
|
||||||
|
|
||||||
Plug 'branwright1/salvation-vim'
|
|
||||||
|
|
||||||
Plug 'tpope/vim-repeat'
|
Plug 'tpope/vim-repeat'
|
||||||
|
|
||||||
Plug 'junegunn/goyo.vim', {'on': 'Goyo'}
|
Plug 'junegunn/goyo.vim', {'on': 'Goyo'}
|
||||||
|
@ -55,8 +52,6 @@ Plug 'branwright1/salvation-vim'
|
||||||
|
|
||||||
Plug 'jiangmiao/auto-pairs'
|
Plug 'jiangmiao/auto-pairs'
|
||||||
|
|
||||||
Plug 'junegunn/vim-peekaboo' " highlight jump points (f, t)
|
|
||||||
|
|
||||||
Plug 'machakann/vim-highlightedyank'
|
Plug 'machakann/vim-highlightedyank'
|
||||||
|
|
||||||
Plug 'ciaranm/detectindent'
|
Plug 'ciaranm/detectindent'
|
||||||
|
@ -71,7 +66,13 @@ Plug 'branwright1/salvation-vim'
|
||||||
|
|
||||||
Plug 'liuchengxu/vista.vim'
|
Plug 'liuchengxu/vista.vim'
|
||||||
|
|
||||||
|
Plug 'antoinemadec/coc-fzf'
|
||||||
|
|
||||||
|
Plug 'tommcdo/vim-exchange'
|
||||||
|
|
||||||
|
Plug 'puremourning/vimspector'
|
||||||
|
|
||||||
|
Plug 'svermeulen/vim-yoink'
|
||||||
" Language Plugins ----------------------------------------------------- {{{
|
" Language Plugins ----------------------------------------------------- {{{
|
||||||
|
|
||||||
"Plug 'satabin/hocon-vim'
|
"Plug 'satabin/hocon-vim'
|
||||||
|
|
|
@ -4,13 +4,18 @@ let g:which_key_map = {}
|
||||||
call which_key#register('<Space>', "g:which_key_map")
|
call which_key#register('<Space>', "g:which_key_map")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
let g:which_key_map = {
|
let g:which_key_map = {
|
||||||
\ 'h' : 'which_key_ignore', 'l' : 'which_key_ignore',
|
\ 'h' : 'which_key_ignore', 'l' : 'which_key_ignore',
|
||||||
\ 'f' : 'which_key_ignore', 's': 'which_key_ignore' ,
|
\ 'f' : 'which_key_ignore', 's': 'which_key_ignore' ,
|
||||||
\ 'c' : { 'name': '+comment_out' },
|
\ 'c' : { 'name': '+comment_out' },
|
||||||
\ 'e' : { 'name': '+emmet' },
|
\ 'e' : { 'name': '+emmet' },
|
||||||
|
\ '[' : ['<Plug>(YoinkPostPasteSwapBack)', 'Swap last paste backwards' ],
|
||||||
|
\ ']' : ['<Plug>(YoinkPostPasteSwapForward)', 'Swap last paste backwards' ],
|
||||||
\ 'z' : { 'name': '+folds', 'c': ['foldclose', 'close fold'],
|
\ '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'] = {
|
let g:which_key_map['m'] = {
|
||||||
\ 'name' : '+Code-actions' ,
|
\ 'name' : '+Code-actions' ,
|
||||||
\ 'd' : [ ':call Show_documentation()' , 'show documentation' ] ,
|
\ 'd' : [ ':call Show_documentation()' , 'show documentation' ] ,
|
||||||
\ 's' : [ ':CocList -I symbols' , 'list symbols' ] ,
|
\ 's' : [ ':CocFzfList symbols' , 'list symbols' ] ,
|
||||||
\ 'o' : [ ':CocList outline' , 'show outline' ] ,
|
\ 'o' : [ ':CocFzfList outline' , 'show outline' ] ,
|
||||||
\ 'c' : [ ':CocList commands' , 'show all coc-commands' ] ,
|
\ 'c' : [ ':CocFzfList commands' , 'show all coc-commands' ] ,
|
||||||
\ 'g' : [ '<Plug>(coc-definition)' , 'go to definition' ] ,
|
\ 'g' : [ '<Plug>(coc-definition)' , 'go to definition' ] ,
|
||||||
\ 't' : [ '<Plug>(coc-type-definition)' , 'show type definition' ] ,
|
\ 't' : [ '<Plug>(coc-type-definition)' , 'show type definition' ] ,
|
||||||
\ 'i' : [ '<Plug>(coc-implementation)' , 'show implementation' ] ,
|
\ 'i' : [ '<Plug>(coc-implementation)' , 'show implementation' ] ,
|
||||||
|
@ -60,7 +65,7 @@ let g:which_key_map['v'] = {
|
||||||
|
|
||||||
let g:which_key_map['b'] = {
|
let g:which_key_map['b'] = {
|
||||||
\ 'name': '+buffers' ,
|
\ 'name': '+buffers' ,
|
||||||
\ 'o' : ['Buffers' , 'select open buffer' ] ,
|
\ 'b' : ['Buffers' , 'select open buffer' ] ,
|
||||||
\ 'c' : [':bdelete!' , 'close open buffer' ] ,
|
\ 'c' : [':bdelete!' , 'close open buffer' ] ,
|
||||||
\ 'w' : [':bwipeout!' , 'wipeout open buffer' ] ,
|
\ 'w' : [':bwipeout!' , 'wipeout open buffer' ] ,
|
||||||
\ }
|
\ }
|
||||||
|
@ -72,7 +77,7 @@ let g:which_key_map['x'] = {
|
||||||
\ 'h' : [':History:' , 'search command history'],
|
\ 'h' : [':History:' , 'search command history'],
|
||||||
\ 'c' : [':Commands' , 'search through commands'],
|
\ 'c' : [':Commands' , 'search through commands'],
|
||||||
\ 's' : ['OverCommandLine', 'Substitute with preview'],
|
\ '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
|
" CocList -A --normal yank needs :CocInstall coc-yank
|
||||||
|
|
Loading…
Reference in a new issue