From f456d790b007c3841549ec35a996483135cceec3 Mon Sep 17 00:00:00 2001 From: gxlin Date: Wed, 16 Jun 2021 00:55:31 +0800 Subject: Add vim-godot plug --- .vim/plugins/airline.plug | 4 +++ .vim/plugins/airline.vim | 4 --- .vim/plugins/ale.vim | 4 +-- .vim/plugins/asyncrun.plug | 5 ++++ .vim/plugins/easymotion.plug | 3 ++ .vim/plugins/easymotion.vim | 3 -- .vim/plugins/fugitive.plug | 4 +++ .vim/plugins/fugitive.vim | 4 --- .vim/plugins/general.plug | 9 ++++++ .vim/plugins/godot.vim | 35 ++++++++++++++++++++++ .vim/plugins/gutentags.plug | 8 +++++ .vim/plugins/gutentags.vim | 8 ----- .vim/plugins/init.vim | 15 ++++++++-- .vim/plugins/lang.plug | 2 ++ .vim/plugins/leaderf.vim | 5 ++-- .vim/plugins/ledger.plug | 14 +++++++++ .vim/plugins/ledger.vim | 14 --------- .vim/plugins/lsp.plug | 39 ++++++++++++++++++++++++ .vim/plugins/lsp.vim | 39 ------------------------ .vim/plugins/markdown.plug | 4 +++ .vim/plugins/markdown.vim | 4 --- .vim/plugins/misc.plug | 13 ++++++++ .vim/plugins/misc.vim | 13 -------- .vim/plugins/slime.plug | 15 ++++++++++ .vim/plugins/slime.vim | 15 ---------- .vim/plugins/startify.plug | 1 + .vim/plugins/startify.vim | 1 - .vim/plugins/tex.plug | 1 + .vim/plugins/tex.vim | 1 - .vim/plugins/vimspector.plug | 68 ++++++++++++++++++++++++++++++++++++++++++ .vim/plugins/vimspector.vim | 68 ------------------------------------------ .vim/plugins/vimwiki.plug | 9 ++++++ .vim/plugins/vimwiki.vim | 9 ------ .vim/plugins/vista.plug | 9 ++++++ .vim/plugins/vista.vim | 9 ------ .vim/plugins/youcompleteme.vim | 7 +---- 36 files changed, 260 insertions(+), 206 deletions(-) create mode 100644 .vim/plugins/airline.plug delete mode 100644 .vim/plugins/airline.vim create mode 100644 .vim/plugins/asyncrun.plug create mode 100644 .vim/plugins/easymotion.plug delete mode 100644 .vim/plugins/easymotion.vim create mode 100644 .vim/plugins/fugitive.plug delete mode 100644 .vim/plugins/fugitive.vim create mode 100644 .vim/plugins/general.plug create mode 100644 .vim/plugins/godot.vim create mode 100644 .vim/plugins/gutentags.plug delete mode 100644 .vim/plugins/gutentags.vim create mode 100644 .vim/plugins/lang.plug create mode 100644 .vim/plugins/ledger.plug delete mode 100644 .vim/plugins/ledger.vim create mode 100644 .vim/plugins/lsp.plug delete mode 100644 .vim/plugins/lsp.vim create mode 100644 .vim/plugins/markdown.plug delete mode 100644 .vim/plugins/markdown.vim create mode 100644 .vim/plugins/misc.plug delete mode 100644 .vim/plugins/misc.vim create mode 100644 .vim/plugins/slime.plug delete mode 100644 .vim/plugins/slime.vim create mode 100644 .vim/plugins/startify.plug delete mode 100644 .vim/plugins/startify.vim create mode 100644 .vim/plugins/tex.plug delete mode 100644 .vim/plugins/tex.vim create mode 100644 .vim/plugins/vimspector.plug delete mode 100644 .vim/plugins/vimspector.vim create mode 100644 .vim/plugins/vimwiki.plug delete mode 100644 .vim/plugins/vimwiki.vim create mode 100644 .vim/plugins/vista.plug delete mode 100644 .vim/plugins/vista.vim (limited to '.vim/plugins') diff --git a/.vim/plugins/airline.plug b/.vim/plugins/airline.plug new file mode 100644 index 0000000..a1c1b94 --- /dev/null +++ b/.vim/plugins/airline.plug @@ -0,0 +1,4 @@ +Plug 'vim-airline/vim-airline' +Plug 'vim-airline/vim-airline-themes' + +let g:airline#extensions#tabline#enabled = 1 diff --git a/.vim/plugins/airline.vim b/.vim/plugins/airline.vim deleted file mode 100644 index a1c1b94..0000000 --- a/.vim/plugins/airline.vim +++ /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 index f092c62..105bfa8 100644 --- a/.vim/plugins/ale.vim +++ b/.vim/plugins/ale.vim @@ -1,6 +1,6 @@ -Plug 'dense-analysis/ale' - 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 diff --git a/.vim/plugins/asyncrun.plug b/.vim/plugins/asyncrun.plug new file mode 100644 index 0000000..bed9473 --- /dev/null +++ b/.vim/plugins/asyncrun.plug @@ -0,0 +1,5 @@ +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 :call asyncrun#quickfix_toggle(6) + diff --git a/.vim/plugins/easymotion.plug b/.vim/plugins/easymotion.plug new file mode 100644 index 0000000..ce87f12 --- /dev/null +++ b/.vim/plugins/easymotion.plug @@ -0,0 +1,3 @@ +Plug 'easymotion/vim-easymotion' + +map (easymotion-prefix) diff --git a/.vim/plugins/easymotion.vim b/.vim/plugins/easymotion.vim deleted file mode 100644 index ce87f12..0000000 --- a/.vim/plugins/easymotion.vim +++ /dev/null @@ -1,3 +0,0 @@ -Plug 'easymotion/vim-easymotion' - -map (easymotion-prefix) diff --git a/.vim/plugins/fugitive.plug b/.vim/plugins/fugitive.plug new file mode 100644 index 0000000..8029fc3 --- /dev/null +++ b/.vim/plugins/fugitive.plug @@ -0,0 +1,4 @@ +Plug 'tpope/vim-fugitive' + +nnoremap gl :Gclog! -- % +nnoremap gd :Gdiffsplit diff --git a/.vim/plugins/fugitive.vim b/.vim/plugins/fugitive.vim deleted file mode 100644 index 8029fc3..0000000 --- a/.vim/plugins/fugitive.vim +++ /dev/null @@ -1,4 +0,0 @@ -Plug 'tpope/vim-fugitive' - -nnoremap gl :Gclog! -- % -nnoremap gd :Gdiffsplit diff --git a/.vim/plugins/general.plug b/.vim/plugins/general.plug new file mode 100644 index 0000000..fd57452 --- /dev/null +++ b/.vim/plugins/general.plug @@ -0,0 +1,9 @@ +Plug 'Yggdroot/LeaderF', {'do': ':LeaderfInstallCExtension'} +Plug 'Valloric/YouCompleteMe', { + \ 'do': 'python3 ./install.py --clangd-completer', + \ 'for': ['python', 'cpp', 'go', 'gdscript'] + \ } +Plug 'dense-analysis/ale' + +let g:ycm_language_server = [] +let g:Lf_RootMarkers = [] diff --git a/.vim/plugins/godot.vim b/.vim/plugins/godot.vim new file mode 100644 index 0000000..49354f8 --- /dev/null +++ b/.vim/plugins/godot.vim @@ -0,0 +1,35 @@ +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 rl :GodotRunLast + nnoremap rc :GodotRunCurrent + nnoremap rr :GodotRun +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 new file mode 100644 index 0000000..c2a7090 --- /dev/null +++ b/.vim/plugins/gutentags.plug @@ -0,0 +1,8 @@ +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/gutentags.vim b/.vim/plugins/gutentags.vim deleted file mode 100644 index c2a7090..0000000 --- a/.vim/plugins/gutentags.vim +++ /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 index 590f18c..6b8bff2 100644 --- a/.vim/plugins/init.vim +++ b/.vim/plugins/init.vim @@ -4,12 +4,19 @@ if empty(glob('~/.vim/autoload/plug.vim')) autocmd VimEnter * PlugInstall --sync | source $MYVIMRC endif -let s:plugins = split(expand('~/.dotfiles/.vim/plugins/*.vim')) +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 - if plugin !~ 'init.vim' - exec "source " . plugin + exec "source " . plugin + endfor +endfunction + +function! s:load_settings() + for setting in s:settings + if setting !~ 'init.vim' + exec "source " . setting endif endfor endfunction @@ -17,3 +24,5 @@ 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 new file mode 100644 index 0000000..338de43 --- /dev/null +++ b/.vim/plugins/lang.plug @@ -0,0 +1,2 @@ +Plug 'habamax/vim-godot', {'for': 'gdscript'} + diff --git a/.vim/plugins/leaderf.vim b/.vim/plugins/leaderf.vim index 116a994..043fe1b 100644 --- a/.vim/plugins/leaderf.vim +++ b/.vim/plugins/leaderf.vim @@ -1,5 +1,3 @@ -Plug 'Yggdroot/LeaderF', {'do': ':LeaderfInstallCExtension'} - " " Show icons, icons are shown by default let g:Lf_ShowDevIcons = 1 @@ -19,4 +17,5 @@ xnoremap gf :=printf("Leaderf! rg -F -e %s ", leaderf#Rg#visual()) noremap go :Leaderf! rg --recall let g:Lf_WorkingDirectoryMode = 'AF' -let g:Lf_RootMarkers = ['.project', '.root', '.svn', '.git', '.hg', '.projectile'] + +let g:Lf_RootMarkers += ['.project', '.root', '.svn', '.git', '.hg', '.projectile'] diff --git a/.vim/plugins/ledger.plug b/.vim/plugins/ledger.plug new file mode 100644 index 0000000..b3a1e25 --- /dev/null +++ b/.vim/plugins/ledger.plug @@ -0,0 +1,14 @@ +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 + noremap } /^\d + inoremap =ledger#autocomplete_and_align() + vnoremap :LedgerAlign +endfunction diff --git a/.vim/plugins/ledger.vim b/.vim/plugins/ledger.vim deleted file mode 100644 index b3a1e25..0000000 --- a/.vim/plugins/ledger.vim +++ /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 - noremap } /^\d - inoremap =ledger#autocomplete_and_align() - vnoremap :LedgerAlign -endfunction diff --git a/.vim/plugins/lsp.plug b/.vim/plugins/lsp.plug new file mode 100644 index 0000000..1a5704b --- /dev/null +++ b/.vim/plugins/lsp.plug @@ -0,0 +1,39 @@ +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 gd (lsp-definition) + nmap gs (lsp-document-symbol-search) + nmap gS (lsp-workspace-symbol-search) + nmap gr (lsp-references) + nmap gi (lsp-implementation) + nmap gt (lsp-type-definition) + nmap rn (lsp-rename) + nmap [g (lsp-previous-diagnostic) + nmap ]g (lsp-next-diagnostic) + nmap K (lsp-hover) + inoremap lsp#scroll(+4) + inoremap 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/lsp.vim b/.vim/plugins/lsp.vim deleted file mode 100644 index 1a5704b..0000000 --- a/.vim/plugins/lsp.vim +++ /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 gd (lsp-definition) - nmap gs (lsp-document-symbol-search) - nmap gS (lsp-workspace-symbol-search) - nmap gr (lsp-references) - nmap gi (lsp-implementation) - nmap gt (lsp-type-definition) - nmap rn (lsp-rename) - nmap [g (lsp-previous-diagnostic) - nmap ]g (lsp-next-diagnostic) - nmap K (lsp-hover) - inoremap lsp#scroll(+4) - inoremap 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 new file mode 100644 index 0000000..1e12dad --- /dev/null +++ b/.vim/plugins/markdown.plug @@ -0,0 +1,4 @@ +Plug 'iamcco/markdown-preview.nvim', { + \ 'do': {-> mkdp#util#install()}, + \ 'for': ['markdown', 'vim-plug'] + \ } diff --git a/.vim/plugins/markdown.vim b/.vim/plugins/markdown.vim deleted file mode 100644 index 1e12dad..0000000 --- a/.vim/plugins/markdown.vim +++ /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 new file mode 100644 index 0000000..f79b438 --- /dev/null +++ b/.vim/plugins/misc.plug @@ -0,0 +1,13 @@ +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 :call asyncrun#quickfix_toggle(6) + +Plug 'mhinz/vim-signify' +Plug 'tpope/vim-unimpaired' +Plug 'godlygeek/tabular' +Plug 'sonph/onehalf', { 'rtp': 'vim' } diff --git a/.vim/plugins/misc.vim b/.vim/plugins/misc.vim deleted file mode 100644 index f79b438..0000000 --- a/.vim/plugins/misc.vim +++ /dev/null @@ -1,13 +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 :call asyncrun#quickfix_toggle(6) - -Plug 'mhinz/vim-signify' -Plug 'tpope/vim-unimpaired' -Plug 'godlygeek/tabular' -Plug 'sonph/onehalf', { 'rtp': 'vim' } diff --git a/.vim/plugins/slime.plug b/.vim/plugins/slime.plug new file mode 100644 index 0000000..0989a66 --- /dev/null +++ b/.vim/plugins/slime.plug @@ -0,0 +1,15 @@ +Plug 'jpalardy/vim-slime', { + \'on': [ + \'SlimeRegionSend', + \'SlimeParagraphSend', + \'SlimeConfig' + \] + \} + +let g:slime_no_mappings = 1 + +xmap SlimeRegionSend +nmap SlimeParagraphSend +nmap v SlimeConfig + +let g:slime_target = 'tmux' diff --git a/.vim/plugins/slime.vim b/.vim/plugins/slime.vim deleted file mode 100644 index 0989a66..0000000 --- a/.vim/plugins/slime.vim +++ /dev/null @@ -1,15 +0,0 @@ -Plug 'jpalardy/vim-slime', { - \'on': [ - \'SlimeRegionSend', - \'SlimeParagraphSend', - \'SlimeConfig' - \] - \} - -let g:slime_no_mappings = 1 - -xmap SlimeRegionSend -nmap SlimeParagraphSend -nmap v SlimeConfig - -let g:slime_target = 'tmux' diff --git a/.vim/plugins/startify.plug b/.vim/plugins/startify.plug new file mode 100644 index 0000000..a4f7c1d --- /dev/null +++ b/.vim/plugins/startify.plug @@ -0,0 +1 @@ +Plug 'mhinz/vim-startify' diff --git a/.vim/plugins/startify.vim b/.vim/plugins/startify.vim deleted file mode 100644 index a4f7c1d..0000000 --- a/.vim/plugins/startify.vim +++ /dev/null @@ -1 +0,0 @@ -Plug 'mhinz/vim-startify' diff --git a/.vim/plugins/tex.plug b/.vim/plugins/tex.plug new file mode 100644 index 0000000..6c3f788 --- /dev/null +++ b/.vim/plugins/tex.plug @@ -0,0 +1 @@ +" Plug 'lervag/vimtex' diff --git a/.vim/plugins/tex.vim b/.vim/plugins/tex.vim deleted file mode 100644 index 6c3f788..0000000 --- a/.vim/plugins/tex.vim +++ /dev/null @@ -1 +0,0 @@ -" Plug 'lervag/vimtex' diff --git a/.vim/plugins/vimspector.plug b/.vim/plugins/vimspector.plug new file mode 100644 index 0000000..a39d4bd --- /dev/null +++ b/.vim/plugins/vimspector.plug @@ -0,0 +1,68 @@ +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 diff --git a/.vim/plugins/vimspector.vim b/.vim/plugins/vimspector.vim deleted file mode 100644 index a39d4bd..0000000 --- a/.vim/plugins/vimspector.vim +++ /dev/null @@ -1,68 +0,0 @@ -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 diff --git a/.vim/plugins/vimwiki.plug b/.vim/plugins/vimwiki.plug new file mode 100644 index 0000000..cba8593 --- /dev/null +++ b/.vim/plugins/vimwiki.plug @@ -0,0 +1,9 @@ +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/vimwiki.vim b/.vim/plugins/vimwiki.vim deleted file mode 100644 index cba8593..0000000 --- a/.vim/plugins/vimwiki.vim +++ /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 new file mode 100644 index 0000000..02264b9 --- /dev/null +++ b/.vim/plugins/vista.plug @@ -0,0 +1,9 @@ +Plug 'liuchengxu/vista.vim' + +let g:vista_default_executive = 'ctags' + +let g:vista_executive_for = { + \ 'go': 'vim_lsp', + \ } + +nnoremap s :Vista diff --git a/.vim/plugins/vista.vim b/.vim/plugins/vista.vim deleted file mode 100644 index 02264b9..0000000 --- a/.vim/plugins/vista.vim +++ /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 s :Vista diff --git a/.vim/plugins/youcompleteme.vim b/.vim/plugins/youcompleteme.vim index 050969d..4c9f570 100644 --- a/.vim/plugins/youcompleteme.vim +++ b/.vim/plugins/youcompleteme.vim @@ -1,8 +1,3 @@ -Plug 'Valloric/YouCompleteMe', { - \ 'do': 'python3 ./install.py --clangd-completer', - \ 'for': ['python', 'cpp'] - \ } - let g:ycm_server_log_level = 'info' let g:ycm_add_preview_to_completeopt = 0 let g:ycm_show_diagnostics_ui = 0 @@ -11,7 +6,7 @@ let g:ycm_complete_in_strings = 1 let g:ycm_filetype_whilelist = { \ "c": 1, "cpp": 1, "sh": 1, "zsh": 1, - \ "python": 1, "go": 1, + \ "python": 1, "go": 1, "gdscript": 1 \ } let g:ycm_filetype_blacklist = { \ 'ledger': 1 -- cgit v1.2.3