Mercurial > vim-gutentags
diff plugin/gutentags.vim @ 202:b50b6d0f82dd
Refactor for Vim8/Neovim job support.
- Refactor all modules' `generate` methods to use a vaguely generic job API
wrapper that works for both Vim8 and Neovim jobs.
- Make the `statusline` method use new `User` autocommands driven by the
job-started/ended callbacks.
- Remove all the lock-file-related stuff.
- Better error/warning messages.
- Move a few things around.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sat, 31 Mar 2018 18:42:54 -0700 |
parents | 2489b4b54d5c |
children | 18dbf8d02b4c |
line wrap: on
line diff
--- a/plugin/gutentags.vim Sat Mar 31 18:35:46 2018 -0700 +++ b/plugin/gutentags.vim Sat Mar 31 18:42:54 2018 -0700 @@ -1,6 +1,6 @@ " gutentags.vim - Automatic ctags management for Vim " Maintainer: Ludovic Chabant <http://ludovic.chabant.com> -" Version: 0.0.1 +" Version: 2.0.0 " Globals {{{ @@ -8,8 +8,13 @@ finish endif -if v:version < 704 - echoerr "gutentags: this plugin requires vim >= 7.4." +if v:version < 800 + echoerr "gutentags: this plugin requires vim >= 8.0." + finish +endif + +if !(has('job') || (has('nvim') && exists('*jobwait'))) + echoerr "gutentags: this plugin requires the job API from Vim8 or Neovim." finish endif @@ -53,6 +58,8 @@ let g:gutentags_generate_on_empty_buffer = get(g:, 'gutentags_generate_on_empty_buffer', 0) let g:gutentags_file_list_command = get(g:, 'gutentags_file_list_command', '') +let g:gutentags_use_jobs = get(g:, 'gutentags_use_jobs', has('job')) + if !exists('g:gutentags_cache_dir') let g:gutentags_cache_dir = '' elseif !empty(g:gutentags_cache_dir) @@ -92,8 +99,6 @@ " Toggles and Miscellaneous Commands {{{ -command! GutentagsUnlock :call gutentags#delete_lock_files() - if g:gutentags_define_advanced_commands command! GutentagsToggleEnabled :let g:gutentags_enabled=!g:gutentags_enabled command! GutentagsToggleTrace :call gutentags#toggletrace()