Skip to content

Commit 6730879

Browse files
committed
apply johnzeng's patch according to #16
1 parent d6fee2b commit 6730879

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

autoload/codequery.vim

Lines changed: 7 additions & 1 deletion
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

Lines changed: 5 additions & 0 deletions
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)