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 let g:ycm_language_server = [] call plug#begin('~/.vim/plugged') " General Plug 'Valloric/YouCompleteMe', { \ 'do': 'python3 ./install.py --clangd-completer', \ } Plug 'prabirshrestha/vim-lsp' 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' nnoremap gl :Gclog! -- % nnoremap gd :Gdiffsplit nnoremap gs :G Plug 'easymotion/vim-easymotion' map (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': 'VimspectorContinue' } let g:vimspector_install_gadgets = ['debugpy'] nmap dc VimspectorContinue nmap dq VimspectorStop nmap db VimspectorToggleBreakpoint nmap dn VimspectorStepOver nmap ds VimspectorStepInto nmap df VimspectorStepOut nmap di VimspectorBalloonEval xmap di VimspectorBalloonEval let s:mapped = {} function! s:set_debug_keymaps() abort if has_key(s:mapped, string(bufnr())) return endif " nmap c VimspectorContinue " nmap q VimspectorStop " nmap b VimspectorToggleBreakpoint nmap m VimspectorStepOver " nmap s VimspectorStepInto " nmap f VimspectorStepOut " nmap i VimspectorBalloonEval " xmap i 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 c " silent! nunmap q " silent! nunmap b silent! nunmap m " silent! nunmap s " silent! nunmap f " silent! nunmap i " silent! xunmap 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()