Skip to content

apply johnzeng's patch according to https://github.com/devjoe/vim-cod… #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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! 👌

Expand Down Expand Up @@ -375,6 +377,13 @@ let g:codequery_enable_not_so_magic_menu = 1

<br>

## Contributors
* [devjoe](https://github.com/devjoe)
* [johnzeng](https://github.com/johnzeng)
* [syslot](https://github.com/syslot)

<br>

## Credits

Thank all for working on these great projects!
Expand Down
8 changes: 7 additions & 1 deletion autoload/codequery.vim
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,13 @@ function! codequery#make_codequery_db(args) abort
continue
endif

if v:version >= 800 && !has('nvim')
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")}
Expand Down
5 changes: 5 additions & 0 deletions autoload/codequery/db.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down