diff options
Diffstat (limited to '.vim/plugin')
-rw-r--r-- | .vim/plugin/init.vim | 153 | ||||
-rw-r--r-- | .vim/plugin/misc.vim | 5 | ||||
-rw-r--r-- | .vim/plugin/nnn.vim | 1 |
3 files changed, 5 insertions, 154 deletions
diff --git a/.vim/plugin/init.vim b/.vim/plugin/init.vim deleted file mode 100644 index 7a01616..0000000 --- a/.vim/plugin/init.vim +++ /dev/null @@ -1,153 +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:settings = split(expand('~/.vim/plugin/*.vim')) - -function! s:load_settings() - for setting in s:settings - if setting !~ 'init.vim' - exec "source " . setting - endif - endfor -endfunction - -function! BuildYCM(info) - let ycm_install_options=' --clangd-completer' - - if !empty(glob("/usr/bin/go")) || !empty(glob("/usr/local/bin/go")) - let ycm_install_options = ycm_install_options . ' --go-completer' - endif - - exec '!python3 ./install.py' . ycm_install_options -endfunction - -call plug#begin('~/.vim/plugged') - -" General -Plug 'Valloric/YouCompleteMe', { - \ 'do': function('BuildYCM'), - \ } -Plug 'SirVer/ultisnips' -Plug 'honza/vim-snippets' -Plug 'prabirshrestha/vim-lsp' -Plug 'mbbill/undotree' - -Plug 'dense-analysis/ale' -Plug 'junegunn/fzf' -Plug 'junegunn/fzf.vim' -Plug 'tpope/vim-eunuch' -Plug 'tpope/vim-sleuth' " Automatically adjust indent -Plug 'godlygeek/tabular' -Plug 'airblade/vim-rooter' -Plug 'ludovicchabant/vim-gutentags' - -Plug 'vim-airline/vim-airline' -Plug 'vim-airline/vim-airline-themes' - -let g:airline#extensions#tabline#enabled = 1 -Plug 'tpope/vim-fugitive' -Plug 'junegunn/gv.vim' - -Plug 'easymotion/vim-easymotion' - -map <Space> <Plug>(easymotion-prefix) - -Plug 'editorconfig/editorconfig-vim' - -" Language specific -Plug 'habamax/vim-godot', {'for': 'gdscript'} -Plug 'scrooloose/nerdtree', {'on': 'NERDTreeToggle'} -Plug 'ledger/vim-ledger', {'for': 'ledger'} - -Plug 'iamcco/markdown-preview.nvim', { - \ 'do': {-> mkdp#util#install()}, - \ 'for': ['markdown', 'vim-plug'] - \ } - -Plug 'mhinz/vim-signify' -Plug 'tpope/vim-unimpaired' -Plug 'voldikss/vim-floaterm' " Use :FloatermNew to open floating terminal - -Plug 'joshdick/onedark.vim' -Plug 'liuchengxu/vista.vim' - -let g:vista_default_executive = 'ctags' - -let g:vista_executive_for = { - \ 'go': 'vim_lsp', - \ } - -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 -call plug#end() - -call s:load_settings() diff --git a/.vim/plugin/misc.vim b/.vim/plugin/misc.vim new file mode 100644 index 0000000..f8c5d9d --- /dev/null +++ b/.vim/plugin/misc.vim @@ -0,0 +1,5 @@ +packadd! onedark.vim +silent colorscheme onedark + +let g:airline#extensions#tabline#enabled = 1 +map <Space> <Plug>(easymotion-prefix) diff --git a/.vim/plugin/nnn.vim b/.vim/plugin/nnn.vim deleted file mode 100644 index 071e694..0000000 --- a/.vim/plugin/nnn.vim +++ /dev/null @@ -1 +0,0 @@ -command! NnnPicker packadd nnn.vim | NnnPicker |