plugins: Use custom vimspector base dir
[vimconf.git] / plugins-noroot-nolowendbox.vim
index f802c9ced50c71524fe22fae4560cdfeb52c711d..84828779fe72a4a4e4e9c5db739909c4bff129be 100644 (file)
@@ -48,14 +48,13 @@ Plug 'sjl/splice.vim', {'on': 'SpliceInit'}
 " Costs a second startup time
 Plug 'dbeniamine/cheat.sh-vim', {'on': 'Cheat'}
 
+Plug 'sheerun/vim-polyglot'
+
 if has('nvim-0.5')
     Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
     Plug 'nvim-treesitter/nvim-treesitter-refactor', {'do': ':TSUpdate'}
-else
-    Plug 'sheerun/vim-polyglot'
 endif
 
-
 function PluginsNorootNolowendboxConfig()
     let g:neomake_c_enabled_makers = ['clangtidy', 'clangcheck']
     let g:neomake_cpp_enabled_makers = ['clangtidy', 'clangcheck']
@@ -242,11 +241,13 @@ EOF
     let g:vimtex_fold_levelmarker = '➜'
 
     au FileType c,cpp,obj,java,python packadd! vimspector
+    let g:vimspector_base_dir = expand('~/.vim/vimspector-config')
     let g:vimspector_install_gadgets = [ 'debugpy', 'vscode-cpptools' ]
     "let g:vimspector_enable_mappings = 'VISUAL_STUDIO'
 
     function VimspectorRestartOrCreateConfig()
         if !filereadable('.vimspector.json')
+            echo "Missing .vimspector.json, created one."
             execute 'tabe .vimspector.json'
         else
             call vimspector#Restart()
@@ -256,6 +257,7 @@ EOF
     nmap <leader>dc  <Plug>VimspectorContinue
     nmap <leader>ds  <Plug>VimspectorStop
     nmap <leader>dr  :call VimspectorRestartOrCreateConfig()<CR>
+    "nmap <leader>dr  :call vimspector#Restart()<CR>
     nmap <leader>drr :call vimspector#Reset()<CR>
     nmap <leader>dp  <Plug>VimspectorPause
     nmap <leader>db  <Plug>VimspectorToggleBreakpoint
@@ -270,6 +272,6 @@ EOF
     " for visual mode, the visually selected text
     xmap <Leader>de  <Plug>VimspectorBalloonEval
 
-    au BufNewFile .vimspector.json read ~/.vim/neosnippets/vimspector.json
+    au BufNewFile .vimspector.json read ~/.vim/vimspector-config/vimspector.json
 
 endfunction