diff options
author | gxlin <[email protected]> | 2021-07-15 21:28:06 +0800 |
---|---|---|
committer | gxlin <[email protected]> | 2021-07-15 21:28:06 +0800 |
commit | d4e1469e4b0c5aaf5c23be555e8b224f9254d781 (patch) | |
tree | e68a0e5dd44ee43efc2d70c081f41ae3237a78c1 /.vim/plugins | |
parent | 36f249e1a7250e24f0c415b5bc53ba1b2f5806d4 (diff) | |
download | dotfiles-d4e1469e4b0c5aaf5c23be555e8b224f9254d781.tar.gz dotfiles-d4e1469e4b0c5aaf5c23be555e8b224f9254d781.tar.bz2 dotfiles-d4e1469e4b0c5aaf5c23be555e8b224f9254d781.zip |
A usable boostrap config
Diffstat (limited to '.vim/plugins')
-rw-r--r-- | .vim/plugins/airline.plug | 4 | ||||
-rw-r--r-- | .vim/plugins/ale.vim | 24 | ||||
-rw-r--r-- | .vim/plugins/asyncrun.plug | 5 | ||||
-rw-r--r-- | .vim/plugins/easymotion.plug | 3 | ||||
-rw-r--r-- | .vim/plugins/fugitive.plug | 7 | ||||
-rw-r--r-- | .vim/plugins/general.plug | 10 | ||||
-rw-r--r-- | .vim/plugins/godot.vim | 35 | ||||
-rw-r--r-- | .vim/plugins/gutentags.plug | 8 | ||||
-rw-r--r-- | .vim/plugins/init.vim | 28 | ||||
-rw-r--r-- | .vim/plugins/lang.plug | 2 | ||||
-rw-r--r-- | .vim/plugins/leaderf.vim | 21 | ||||
-rw-r--r-- | .vim/plugins/ledger.plug | 14 | ||||
-rw-r--r-- | .vim/plugins/lsp.plug | 39 | ||||
-rw-r--r-- | .vim/plugins/markdown.plug | 4 | ||||
-rw-r--r-- | .vim/plugins/misc.plug | 16 | ||||
-rw-r--r-- | .vim/plugins/slime.plug | 15 | ||||
-rw-r--r-- | .vim/plugins/startify.plug | 1 | ||||
-rw-r--r-- | .vim/plugins/tex.plug | 1 | ||||
-rw-r--r-- | .vim/plugins/vimspector.plug | 68 | ||||
-rw-r--r-- | .vim/plugins/vimwiki.plug | 9 | ||||
-rw-r--r-- | .vim/plugins/vista.plug | 9 | ||||
-rw-r--r-- | .vim/plugins/youcompleteme.vim | 13 |
22 files changed, 0 insertions, 336 deletions
diff --git a/.vim/plugins/airline.plug b/.vim/plugins/airline.plug deleted file mode 100644 index a1c1b94..0000000 --- a/.vim/plugins/airline.plug +++ /dev/null @@ -1,4 +0,0 @@ -Plug 'vim-airline/vim-airline' -Plug 'vim-airline/vim-airline-themes' - -let g:airline#extensions#tabline#enabled = 1 diff --git a/.vim/plugins/ale.vim b/.vim/plugins/ale.vim deleted file mode 100644 index 105bfa8..0000000 --- a/.vim/plugins/ale.vim +++ /dev/null @@ -1,24 +0,0 @@ -let g:ale_linters_explicit = 1 -let g:ale_completion_enabled = 1 -let g:ale_completion_autoimport = 1 -let g:ale_completion_delay = 500 -let g:ale_echo_delay = 20 -let g:ale_lint_delay = 500 -let g:ale_echo_msg_format = '[%linter%] %code: %%s' -let g:ale_lint_on_text_changed = 'normal' -let g:ale_lint_on_insert_leave = 1 -let g:airline#extensions#ale#enabled = 1 - -let g:ale_c_gcc_options = '-Wall -O2 -std=c99' -let g:ale_cpp_gcc_options = '-Wall -O2 -std=c++14' -let g:ale_c_cppcheck_options = '' -let g:ale_cpp_cppcheck_options = '' - -let g:ale_sign_error = "\ue009\ue009" -hi! clear SpellBad -hi! clear SpellCap -hi! clear SpellRare -hi! SpellBad gui=undercurl guisp=red -hi! SpellCap gui=undercurl guisp=blue -hi! SpellRare gui=undercurl guisp=magenta - diff --git a/.vim/plugins/asyncrun.plug b/.vim/plugins/asyncrun.plug deleted file mode 100644 index bed9473..0000000 --- a/.vim/plugins/asyncrun.plug +++ /dev/null @@ -1,5 +0,0 @@ -let g:asyncrun_open = 6 " the number of lines of quickfix window -let g:asyncrun_bell = 1 " the bell rings when the task is done -" use f10 to open/close asyncrun quickfix window -nnoremap <F10> :call asyncrun#quickfix_toggle(6)<cr> - diff --git a/.vim/plugins/easymotion.plug b/.vim/plugins/easymotion.plug deleted file mode 100644 index ce87f12..0000000 --- a/.vim/plugins/easymotion.plug +++ /dev/null @@ -1,3 +0,0 @@ -Plug 'easymotion/vim-easymotion' - -map <Space> <Plug>(easymotion-prefix) diff --git a/.vim/plugins/fugitive.plug b/.vim/plugins/fugitive.plug deleted file mode 100644 index 8dd25b2..0000000 --- a/.vim/plugins/fugitive.plug +++ /dev/null @@ -1,7 +0,0 @@ -" vim: ft=vim - -Plug 'tpope/vim-fugitive' - -nnoremap <silent> <leader>gl :Gclog! -- %<CR> -nnoremap <silent> <leader>gd :Gdiffsplit <CR> -nnoremap <silent> <leader>gs :G<CR> diff --git a/.vim/plugins/general.plug b/.vim/plugins/general.plug deleted file mode 100644 index 4bbc709..0000000 --- a/.vim/plugins/general.plug +++ /dev/null @@ -1,10 +0,0 @@ -Plug 'Yggdroot/LeaderF', {'do': ':LeaderfInstallCExtension'} -Plug 'Valloric/YouCompleteMe', { - \ 'do': 'python3 ./install.py --clangd-completer', - \ 'for': ['python', 'cpp', 'go', 'gdscript'] - \ } -Plug 'dense-analysis/ale' -Plug 'sheerun/vim-polyglot' - -let g:ycm_language_server = [] -let g:Lf_RootMarkers = [] diff --git a/.vim/plugins/godot.vim b/.vim/plugins/godot.vim deleted file mode 100644 index 49354f8..0000000 --- a/.vim/plugins/godot.vim +++ /dev/null @@ -1,35 +0,0 @@ -if has('macunix') - let g:godot_executable = '/Applications/Godot.app' -endif -if has('win32') || has('win32unix') - let g:godot_executable = '' -endif - -let g:ycm_language_server += [ - \ { - \ 'name': 'godot', - \ 'filetypes': ['gdscript'], - \ 'project_root_files': ['project.godot'], - \ 'port': 6008 - \ } - \ ] - -let g:Lf_RootMarkers += ['project.godot'] - -func! s:godot_settings() abort - setlocal tabstop=4 - nnoremap <buffer> <leader>rl :GodotRunLast<CR> - nnoremap <buffer> <leader>rc :GodotRunCurrent<CR> - nnoremap <buffer> <leader>rr :GodotRun<CR> -endfunc - -augroup godot | au! - au FileType gdscript call s:godot_settings() -augroup end - -call ale#linter#Define('gdscript', { -\ 'name': 'godot', -\ 'lsp': 'socket', -\ 'address': '127.0.0.1:6008', -\ 'project_root': 'project.godot', -\ }) diff --git a/.vim/plugins/gutentags.plug b/.vim/plugins/gutentags.plug deleted file mode 100644 index c2a7090..0000000 --- a/.vim/plugins/gutentags.plug +++ /dev/null @@ -1,8 +0,0 @@ -Plug 'ludovicchabant/vim-gutentags' - -let g:gutentags_project_root = ['.root', '.svn', '.git', '.hg', '.project'] -let g:gutentags_ctags_tagfile = '.tags' -let g:gutentags_ctags_extra_args = ['--fields=+niazS', '--extra=+q'] -let g:gutentags_ctags_extra_args = ['--c++-kinds=+px'] -let g:gutentags_ctags_extra_args = ['--c-kinds=+px'] - diff --git a/.vim/plugins/init.vim b/.vim/plugins/init.vim deleted file mode 100644 index 6b8bff2..0000000 --- a/.vim/plugins/init.vim +++ /dev/null @@ -1,28 +0,0 @@ -if empty(glob('~/.vim/autoload/plug.vim')) - silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs - \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim - autocmd VimEnter * PlugInstall --sync | source $MYVIMRC -endif - -let s:plugins = split(expand('~/.dotfiles/.vim/plugins/*.plug')) -let s:settings = split(expand('~/.dotfiles/.vim/plugins/*.vim')) - -function! s:load_plugins() - for plugin in s:plugins - exec "source " . plugin - endfor -endfunction - -function! s:load_settings() - for setting in s:settings - if setting !~ 'init.vim' - exec "source " . setting - endif - endfor -endfunction - -call plug#begin('~/.vim/plugged') -call s:load_plugins() -call plug#end() - -call s:load_settings() diff --git a/.vim/plugins/lang.plug b/.vim/plugins/lang.plug deleted file mode 100644 index 338de43..0000000 --- a/.vim/plugins/lang.plug +++ /dev/null @@ -1,2 +0,0 @@ -Plug 'habamax/vim-godot', {'for': 'gdscript'} - diff --git a/.vim/plugins/leaderf.vim b/.vim/plugins/leaderf.vim deleted file mode 100644 index 043fe1b..0000000 --- a/.vim/plugins/leaderf.vim +++ /dev/null @@ -1,21 +0,0 @@ -" " Show icons, icons are shown by default -let g:Lf_ShowDevIcons = 1 - -let g:Lf_WindowPosition = 'popup' -let g:Lf_ShortcutF = "<leader>ff" - -noremap <leader>fb :<C-U><C-R>=printf("Leaderf buffer %s", "")<CR><CR> -noremap <leader>fm :<C-U><C-R>=printf("Leaderf mru %s", "")<CR><CR> -noremap <leader>ft :<C-U><C-R>=printf("Leaderf bufTag %s", "")<CR><CR> -noremap <leader>fl :<C-U><C-R>=printf("Leaderf line %s", "")<CR><CR> -noremap <leader>fr :<C-U><C-R>=printf("Leaderf rg %s", "")<CR><CR> -noremap <C-B> :<C-U><C-R>=printf("Leaderf! rg --current-buffer -e %s ", expand("<cword>"))<CR> -noremap <C-F> :<C-U><C-R>=printf("Leaderf! rg -e %s ", expand("<cword>"))<CR> - -" search visually selected text literally -xnoremap gf :<C-U><C-R>=printf("Leaderf! rg -F -e %s ", leaderf#Rg#visual())<CR> -noremap go :<C-U>Leaderf! rg --recall<CR> - -let g:Lf_WorkingDirectoryMode = 'AF' - -let g:Lf_RootMarkers += ['.project', '.root', '.svn', '.git', '.hg', '.projectile'] diff --git a/.vim/plugins/ledger.plug b/.vim/plugins/ledger.plug deleted file mode 100644 index b3a1e25..0000000 --- a/.vim/plugins/ledger.plug +++ /dev/null @@ -1,14 +0,0 @@ -Plug 'ledger/vim-ledger', {'for': 'ledger'} - -let g:ledger_bin = 'ledger' -let g:ledger_align_at = 50 -let g:ledger_commodity_before = 0 - -au FileType ledger call s:ledger_keymap() - -function! s:ledger_keymap() abort - noremap { ?^\d<CR> - noremap } /^\d<CR> - inoremap <silent> <Tab> <C-r>=ledger#autocomplete_and_align()<CR> - vnoremap <silent> <Tab> :LedgerAlign<CR> -endfunction diff --git a/.vim/plugins/lsp.plug b/.vim/plugins/lsp.plug deleted file mode 100644 index 1a5704b..0000000 --- a/.vim/plugins/lsp.plug +++ /dev/null @@ -1,39 +0,0 @@ -Plug 'prabirshrestha/vim-lsp' - -if executable('gopls') - au User lsp_setup call lsp#register_server({ - \ 'name': 'gopls', - \ 'cmd': {server_info->['gopls']}, - \ 'allowlist': ['go'], - \ }) -endif - -function! s:on_lsp_buffer_enabled() abort - setlocal omnifunc=lsp#complete - setlocal signcolumn=no - if exists('+tagfunc') | setlocal tagfunc=lsp#tagfunc | endif - nmap <buffer> gd <plug>(lsp-definition) - nmap <buffer> gs <plug>(lsp-document-symbol-search) - nmap <buffer> gS <plug>(lsp-workspace-symbol-search) - nmap <buffer> gr <plug>(lsp-references) - nmap <buffer> gi <plug>(lsp-implementation) - nmap <buffer> gt <plug>(lsp-type-definition) - nmap <buffer> <leader>rn <plug>(lsp-rename) - nmap <buffer> [g <plug>(lsp-previous-diagnostic) - nmap <buffer> ]g <plug>(lsp-next-diagnostic) - nmap <buffer> K <plug>(lsp-hover) - inoremap <buffer> <expr><c-f> lsp#scroll(+4) - inoremap <buffer> <expr><c-d> lsp#scroll(-4) - - let g:lsp_format_sync_timeout = 1000 - autocmd! BufWritePre *.rs,*.go call execute('LspDocumentFormatSync') - - " refer to doc to add more commands -endfunction - -augroup lsp_install - au! - " call s:on_lsp_buffer_enabled only for languages that has the server registered. - autocmd User lsp_buffer_enabled call s:on_lsp_buffer_enabled() -augroup END - diff --git a/.vim/plugins/markdown.plug b/.vim/plugins/markdown.plug deleted file mode 100644 index 1e12dad..0000000 --- a/.vim/plugins/markdown.plug +++ /dev/null @@ -1,4 +0,0 @@ -Plug 'iamcco/markdown-preview.nvim', { - \ 'do': {-> mkdp#util#install()}, - \ 'for': ['markdown', 'vim-plug'] - \ } diff --git a/.vim/plugins/misc.plug b/.vim/plugins/misc.plug deleted file mode 100644 index 34de763..0000000 --- a/.vim/plugins/misc.plug +++ /dev/null @@ -1,16 +0,0 @@ -Plug 'scrooloose/nerdtree', {'on': 'NERDTreeToggle'} - -Plug 'skywind3000/asyncrun.vim' - -let g:asyncrun_open = 6 " the number of lines of quickfix window -let g:asyncrun_bell = 1 " the bell rings when the task is done -" use f10 to open/close asyncrun quickfix window -nnoremap <F10> :call asyncrun#quickfix_toggle(6)<cr> - -Plug 'mhinz/vim-signify' -Plug 'tpope/vim-unimpaired' -Plug 'godlygeek/tabular' - -" colorscheme -" Plug 'sonph/onehalf', { 'rtp': 'vim' } -Plug 'joshdick/onedark.vim' diff --git a/.vim/plugins/slime.plug b/.vim/plugins/slime.plug deleted file mode 100644 index 0989a66..0000000 --- a/.vim/plugins/slime.plug +++ /dev/null @@ -1,15 +0,0 @@ -Plug 'jpalardy/vim-slime', { - \'on': [ - \'<Plug>SlimeRegionSend', - \'<Plug>SlimeParagraphSend', - \'<Plug>SlimeConfig' - \] - \} - -let g:slime_no_mappings = 1 - -xmap <c-c><c-c> <Plug>SlimeRegionSend -nmap <c-c><c-c> <Plug>SlimeParagraphSend -nmap <c-c>v <Plug>SlimeConfig - -let g:slime_target = 'tmux' diff --git a/.vim/plugins/startify.plug b/.vim/plugins/startify.plug deleted file mode 100644 index a4f7c1d..0000000 --- a/.vim/plugins/startify.plug +++ /dev/null @@ -1 +0,0 @@ -Plug 'mhinz/vim-startify' diff --git a/.vim/plugins/tex.plug b/.vim/plugins/tex.plug deleted file mode 100644 index 6c3f788..0000000 --- a/.vim/plugins/tex.plug +++ /dev/null @@ -1 +0,0 @@ -" Plug 'lervag/vimtex' diff --git a/.vim/plugins/vimspector.plug b/.vim/plugins/vimspector.plug deleted file mode 100644 index a39d4bd..0000000 --- a/.vim/plugins/vimspector.plug +++ /dev/null @@ -1,68 +0,0 @@ -Plug 'puremourning/vimspector', { 'on': '<Plug>VimspectorContinue' } - -let g:vimspector_install_gadgets = ['debugpy'] - -nmap <silent> <Leader>dc <Plug>VimspectorContinue -nmap <silent> <Leader>dq <Plug>VimspectorStop -nmap <silent> <Leader>db <Plug>VimspectorToggleBreakpoint -nmap <silent> <Leader>dn <Plug>VimspectorStepOver -nmap <silent> <Leader>ds <Plug>VimspectorStepInto -nmap <silent> <Leader>df <Plug>VimspectorStepOut -nmap <silent> <Leader>di <Plug>VimspectorBalloonEval -xmap <silent> <Leader>di <Plug>VimspectorBalloonEval - -let s:mapped = {} - -function! s:set_debug_keymaps() abort - if has_key(s:mapped, string(bufnr())) - return - endif - - " nmap <silent> <buffer> c <Plug>VimspectorContinue - " nmap <silent> <buffer> q <Plug>VimspectorStop - " nmap <silent> <buffer> b <Plug>VimspectorToggleBreakpoint - nmap <silent> <buffer> m <Plug>VimspectorStepOver - " nmap <silent> <buffer> s <Plug>VimspectorStepInto - " nmap <silent> <buffer> f <Plug>VimspectorStepOut - " nmap <silent> <buffer> i <Plug>VimspectorBalloonEval - " xmap <silent> <buffer> i <Plug>VimspectorBalloonEval - - let s:mapped[string(bufnr())] = {'modifiable': &modifiable} - - setlocal nomodifiable -endfunction - -function! s:unset_debug_keymaps() abort - let original_buf = bufnr() - let hidden = &hidden - - try - set hidden - for bufnr in keys(s:mapped) - try - execute 'noautocmd buffer' bufnr - " silent! nunmap <buffer> c - " silent! nunmap <buffer> q - " silent! nunmap <buffer> b - silent! nunmap <buffer> m - " silent! nunmap <buffer> s - " silent! nunmap <buffer> f - " silent! nunmap <buffer> i - " silent! xunmap <buffer> i - - let &l:modifiable = s:mapped[bufnr]['modifiable'] - endtry - endfor - finally - execute 'noautocmd buffer' original_buf - let &hidden = hidden - endtry - - let s:mapped = {} -endfunction - -augroup CustomMappings - au! - autocmd User VimspectorJumpedToFrame call s:set_debug_keymaps() - autocmd User VimspectorDebugEnded call s:unset_debug_keymaps() -augroup end diff --git a/.vim/plugins/vimwiki.plug b/.vim/plugins/vimwiki.plug deleted file mode 100644 index cba8593..0000000 --- a/.vim/plugins/vimwiki.plug +++ /dev/null @@ -1,9 +0,0 @@ -Plug 'vimwiki/vimwiki' - -let g:vimwiki_list = [{'path': '~/Documents/notes', - \ 'syntax': 'markdown', 'ext': '.md'}] - -au FileType vimwiki setlocal textwidth=72 - -let g:vimwiki_CJK_length = 1 -let g:vimwiki_url_maxsave = 0 diff --git a/.vim/plugins/vista.plug b/.vim/plugins/vista.plug deleted file mode 100644 index 02264b9..0000000 --- a/.vim/plugins/vista.plug +++ /dev/null @@ -1,9 +0,0 @@ -Plug 'liuchengxu/vista.vim' - -let g:vista_default_executive = 'ctags' - -let g:vista_executive_for = { - \ 'go': 'vim_lsp', - \ } - -nnoremap <leader>s :Vista<CR> diff --git a/.vim/plugins/youcompleteme.vim b/.vim/plugins/youcompleteme.vim deleted file mode 100644 index 4c9f570..0000000 --- a/.vim/plugins/youcompleteme.vim +++ /dev/null @@ -1,13 +0,0 @@ -let g:ycm_server_log_level = 'info' -let g:ycm_add_preview_to_completeopt = 0 -let g:ycm_show_diagnostics_ui = 0 -let g:ycm_collect_identifiers_from_comments_and_strings = 1 -let g:ycm_complete_in_strings = 1 - -let g:ycm_filetype_whilelist = { - \ "c": 1, "cpp": 1, "sh": 1, "zsh": 1, - \ "python": 1, "go": 1, "gdscript": 1 - \ } -let g:ycm_filetype_blacklist = { - \ 'ledger': 1 - \ } |