Skip to content

Commit c31dd27

Browse files
authored
Merge pull request #25 from devjoe/apply-johnzengs-patches
apply johnzeng's patch according to https://github.com/devjoe/vim-cod…
2 parents d6fee2b + 17ea93d commit c31dd27

File tree

3 files changed

+23
-3
lines changed

3 files changed

+23
-3
lines changed

README.md

+11-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ This Vim plugin is built on top of the great tool [CodeQuery](https://github.com
2525
* Support asynchronous search (Vim version >= 8.0)
2626
2. **Manage your database easily**.
2727
* Load, make and move your database file by custom Vim commands.
28-
* Support asynchronous build (Vim version >= 8.0 or by `Dispatch` plugin)
28+
* Support asynchronous build (Vim version >= 8.0 or NeoVim or by `Dispatch` plugin)
2929
* `Note: CodeQuery's SQLite database is built on top of ctags and cscope.`
3030
3. **Know your code more instantly**.
3131
* (TBD)
@@ -69,10 +69,12 @@ Now vim-codequery works better than what you see by using Vim8's async feature.
6969
> * ~~Do lazy-loading.~~
7070
> * ~~Enhance usability.~~
7171
> * ~~Test it.~~
72+
> * ~~Support NeoVim at a certain level.~~
7273
> * Add **explain** command in v1.0.0
74+
> * Make UI be optional
7375
> * Doc it.
7476
>
75-
> Current Version: v0.9.1
77+
> Current Version: v0.9.2
7678
>
7779
> Welcome to try it! 👌
7880
@@ -375,6 +377,13 @@ let g:codequery_enable_not_so_magic_menu = 1
375377
376378
<br>
377379

380+
## Contributors
381+
* [devjoe](https://github.com/devjoe)
382+
* [johnzeng](https://github.com/johnzeng)
383+
* [syslot](https://github.com/syslot)
384+
385+
<br>
386+
378387
## Credits
379388

380389
Thank all for working on these great projects!

autoload/codequery.vim

+7-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,13 @@ function! codequery#make_codequery_db(args) abort
137137
continue
138138
endif
139139

140-
if v:version >= 800 && !has('nvim')
140+
if has('nvim')
141+
echom 'Making DB ...'
142+
let mydict = {'db_path': db_path,
143+
\'callback': function("codequery#db#make_db_nvim_callback")}
144+
let callbacks = {'on_exit': mydict.callback}
145+
let s:build_job = jobstart(['/bin/sh', '-c', shell_cmd], callbacks)
146+
elseif v:version >= 800
141147
echom 'Making DB ...'
142148
let mydict = {'db_path': db_path,
143149
\'callback': function("codequery#db#make_db_callback")}

autoload/codequery/db.vim

+5
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ function! codequery#db#make_db_callback(job, status) dict
4141
endfunction
4242

4343

44+
function! codequery#db#make_db_nvim_callback(job, data, status) dict
45+
echom 'Done! Built codequery db!'
46+
endfunction
47+
48+
4449
function! codequery#db#construct_python_db_build_cmd(db_path) abort
4550
let find_cmd = 'find . -iname "*.py" > python_cscope.files'
4651
let pycscope_cmd = 'pycscope -f "python_cscope.out" -i python_cscope.files'

0 commit comments

Comments
 (0)