diff --git a/README.md b/README.md index 517081f..a30a5a5 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ This Vim plugin is built on top of the great tool [CodeQuery](https://github.com * Support asynchronous search (Vim version >= 8.0) 2. **Manage your database easily**. * Load, make and move your database file by custom Vim commands. - * Support asynchronous build (Vim version >= 8.0 or by `Dispatch` plugin) + * Support asynchronous build (Vim version >= 8.0 or NeoVim or by `Dispatch` plugin) * `Note: CodeQuery's SQLite database is built on top of ctags and cscope.` 3. **Know your code more instantly**. * (TBD) @@ -69,10 +69,12 @@ Now vim-codequery works better than what you see by using Vim8's async feature. > * ~~Do lazy-loading.~~ > * ~~Enhance usability.~~ > * ~~Test it.~~ +> * ~~Support NeoVim at a certain level.~~ > * Add **explain** command in v1.0.0 +> * Make UI be optional > * Doc it. > -> Current Version: v0.9.1 +> Current Version: v0.9.2 > > Welcome to try it! 👌 @@ -375,6 +377,13 @@ let g:codequery_enable_not_so_magic_menu = 1
+## Contributors +* [devjoe](https://github.com/devjoe) +* [johnzeng](https://github.com/johnzeng) +* [syslot](https://github.com/syslot) + +
+ ## Credits Thank all for working on these great projects! diff --git a/autoload/codequery.vim b/autoload/codequery.vim index 973c6ff..e267ec8 100644 --- a/autoload/codequery.vim +++ b/autoload/codequery.vim @@ -137,7 +137,13 @@ function! codequery#make_codequery_db(args) abort continue endif - if v:version >= 800 + if has('nvim') + echom 'Making DB ...' + let mydict = {'db_path': db_path, + \'callback': function("codequery#db#make_db_nvim_callback")} + let callbacks = {'on_exit': mydict.callback} + let s:build_job = jobstart(['/bin/sh', '-c', shell_cmd], callbacks) + elseif v:version >= 800 echom 'Making DB ...' let mydict = {'db_path': db_path, \'callback': function("codequery#db#make_db_callback")} diff --git a/autoload/codequery/db.vim b/autoload/codequery/db.vim index 3801e69..0534810 100644 --- a/autoload/codequery/db.vim +++ b/autoload/codequery/db.vim @@ -41,6 +41,11 @@ function! codequery#db#make_db_callback(job, status) dict endfunction +function! codequery#db#make_db_nvim_callback(job, data, status) dict + echom 'Done! Built codequery db!' +endfunction + + function! codequery#db#construct_python_db_build_cmd(db_path) abort let find_cmd = 'find . -iname "*.py" > python_cscope.files' let pycscope_cmd = 'pycscope -f "python_cscope.out" -i python_cscope.files' diff --git a/autoload/codequery/query.vim b/autoload/codequery/query.vim index 7c8cf24..c144719 100644 --- a/autoload/codequery/query.vim +++ b/autoload/codequery/query.vim @@ -197,7 +197,7 @@ function! codequery#query#do_query(word) abort return endif - if v:version >= 800 + if v:version >= 800 && !has('nvim') echom 'Searching ... [' . a:word . ']' let job_dict = {'is_append': g:codequery_append_to_qf ? 1 : 0,