-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Clap help_tags does not show search result #449
Comments
Can't reproduce. No changes about |
Weird, I delete vim-clap folder, and reinstall it again. It still the same ...
I also tried neovim, after I input search terms in input box, nothing happened and no error messages.
|
Well, try adding some debugging info: diff --git a/autoload/clap/provider/help_tags.vim b/autoload/clap/provider/help_tags.vim
index ae63fc4..6ef9029 100644
--- a/autoload/clap/provider/help_tags.vim
+++ b/autoload/clap/provider/help_tags.vim
@@ -14,6 +14,8 @@ if clap#maple#is_available() && clap#filter#sync#python#has_dynamic_module()
let tmp = tempname()
call writefile([join(s:get_doc_tags(), ','), &runtimepath], tmp)
let helptags_cmd = clap#maple#build_cmd('helptags', tmp)
+
+ echom 'using Rust impl, command:'.printf('"%s" %s', helptags_cmd[0], join(helptags_cmd[1:], ' '))
" Currently the source has to be a String even we use List in job arguments.
return printf('"%s" %s', helptags_cmd[0], join(helptags_cmd[1:], ' '))
endfunction
@@ -44,6 +46,7 @@ else
endif
endif
+ echom 'using vimscript impl'
return s:help_tags_memory_cache
endfunction Based on your |
set nocompatible
set runtimepath^=~/.vim/plugged/vim-clap
syntax on
filetype plugin indent on has cargo: 1
has maple: v:null
has +python3: 1
has py dynamic module: 0
Current FileType:
Third Party Providers: []
Global Options:
let g:clap#autoload_dir = '/Users/xuliucheng/.vim/plugged/vim-clap/autoload'
let g:clap#provider_alias = {'gfiles': 'git_files', 'hist:': 'command_history', 'hist/': 'search_history'}
let g:clap_disable_bottom_top = 0
let g:clap_disable_matches_indicator = v:false
let g:clap_disable_optional_async = v:false
let g:clap_disable_run_rooter = v:false
let g:clap_enable_icon = 0
let g:clap_forerunner_status_sign = {'done': '•', 'running': '!', 'using_cache': '*'}
let g:clap_insert_mode_only = v:false
let g:clap_multi_selection_warning_silent = 0
let g:clap_no_matches_msg = 'NO MATCHES FOUND'
let g:clap_open_action = {'ctrl-v': 'vsplit', 'ctrl-x': 'split', 'ctrl-t': 'tab split'}
let g:clap_popup_border = 'rounded'
let g:clap_preview_size = 5
let g:clap_providers_relaunch_code = '@@'
let g:clap_search_box_border_style = 'nil'
let g:clap_search_box_border_symbols = {'nil': ['', ''], 'curve': ['', ''], 'arrow': ['', '']}
Provider Variables:
[]
Do the other providers work except |
Other provider seems work. |
Finally reproduced it. BTW, the pure vimscript impl will be deprecated once the complete client-server model(you can subscribe the progress of #448) is finished. The various performace workarounds will be all resolved by the new client-server architecture. Only the Rust binary will be required then, no more Python dynamic module, no more stopping and rerunning the maple process multiple times, no more any timer delays, pure async operation. |
Weird, the fix not works for me. my vim version is I'll do more tests to see what's going on. |
I recompile everything, everything still the same, bug still there. No idea what's going. |
I can't reproduce it with the latest Vim avaliable for macOS brew. The rust binary is not being used, so recompilation doesn't help.
You could also see if using the Rust impl helps: diff --git a/autoload/clap/provider/help_tags.vim b/autoload/clap/provider/help_tags.vim
index ae63fc4..f62916c 100644
--- a/autoload/clap/provider/help_tags.vim
+++ b/autoload/clap/provider/help_tags.vim
@@ -8,7 +8,8 @@ function! s:get_doc_tags() abort
return ['/doc/tags'] + map(filter(split(&helplang, ','), 'v:val !=? "en"'), '"/doc/tags-".v:val')
endfunction
-if clap#maple#is_available() && clap#filter#sync#python#has_dynamic_module()
+" if clap#maple#is_available() && clap#filter#sync#python#has_dynamic_module()
+if 1
function! s:help_tags_source() abort
let tmp = tempname() |
Okay, I try to change the above statement to 1 and 0, To 1: It goes rust implementation, it works well. To 0: It goes vimscript implementation, the bugs appear. So, for me. It seems always go to vimscript implementation, never go to rust implementation, even I have maple installed. |
maple is avaliable and you have built the Python dynamic module. Since you don't have the dynamic module, the vimscript impl will be used in the default strategy. |
Then, I have no idea why vimscript implementation not works for me. It works before .... ha. |
Have tested on Ubuntu too, still works with the latest commit using minimal vimrc. If you suspect it could be caused by some update, you may revert to the old version and see if you can find some new clues. |
Okay, I'll try ... and let you know the result. |
Okay, I think I found something ... Testing env:
It is so werid. It seems something wrong after install maple cli. I will try other version tag to see what's going on. |
@liuchengxu Hope these information enough for you to see what's going on. It seems everything works before I didn't test neovim yet. |
I tested neovim from vim-clap |
This should be incorrect as the vimscript impl ( This commit 2ad4ce3 fixes the Vim job command argument, at least for me, I can no longer reproduce this issue . #407 could be related, not sure about that. |
Yes, that's why I said "Weird" ... Still no idea ... |
These could be several possible job leading to this, try to see which one is related. diff --git a/autoload/clap/dispatcher.vim b/autoload/clap/dispatcher.vim
index 71a6e8d..91f95ff 100644
--- a/autoload/clap/dispatcher.vim
+++ b/autoload/clap/dispatcher.vim
@@ -214,6 +214,7 @@ else
endfunction
function! s:job_start(cmd) abort
+ echom '[dispatcher.vim]cmd:'.string(a:amd)
let job = job_start(clap#job#wrap_cmd(a:cmd), {
\ 'in_io': 'null',
\ 'err_cb': function('s:err_cb'),
diff --git a/autoload/clap/job.vim b/autoload/clap/job.vim
index c49bbb2..43c2317 100644
--- a/autoload/clap/job.vim
+++ b/autoload/clap/job.vim
@@ -49,6 +49,7 @@ else
endif
function! clap#job#start_buffered(cmd_list, CloseCallback) abort
+ echom '[clap#job#start_buffered]cmd_list:'.string(a:amd_list)
let job = job_start(a:cmd_list, {
\ 'in_io': 'null',
\ 'close_cb': a:CloseCallback,
diff --git a/autoload/clap/job/daemon.vim b/autoload/clap/job/daemon.vim
index e5ebf86..e888b71 100644
--- a/autoload/clap/job/daemon.vim
+++ b/autoload/clap/job/daemon.vim
@@ -101,6 +101,7 @@ else
function! s:start_service_job(cmd_list) abort
call clap#job#daemon#stop()
+ echom '[daemon#start_service_job]cmd_list:'.string(a:amd_list)
let s:job = job_start(a:cmd_list, {
\ 'err_cb': function('s:err_cb'),
\ 'out_cb': function('s:out_cb'),
diff --git a/autoload/clap/job/stdio.vim b/autoload/clap/job/stdio.vim
index a94a672..3d6b7af 100644
--- a/autoload/clap/job/stdio.vim
+++ b/autoload/clap/job/stdio.vim
@@ -111,6 +111,7 @@ else
function! s:start_service_job(cmd_list) abort
call clap#job#stdio#stop_service()
call clap#spinner#set_busy()
+ echom '[stdio#start_service_job]cmd_list:'.string(a:amd_list)
let s:job = job_start(a:cmd_list, { |
Okay I apply the patch and fixed some typo,
Vim with vim-clap master head and maple installed. |
Well, you may check what happens to diff --git a/autoload/clap/job.vim b/autoload/clap/job.vim
index c49bbb2..bf4cd41 100644
--- a/autoload/clap/job.vim
+++ b/autoload/clap/job.vim
@@ -55,6 +55,7 @@ else
\ 'noblock': 1,
\ 'mode': 'raw',
\ })
+ echom 'job_info:'.string(job_info(job))
let job_id = ch_info(job_getchannel(job))['id']
let s:job_id_map[job_id] = job
return job_id |
Okay, I see ... I'll try. |
One thing I don't get it. If my python dynamic module does not installed, it will fall back to vim script implementation. Why it still run maple command?
|
I trace down to the following script inside
I found The channel open successed, and buffered, but when read from it, it just failed. Here comes the debug messages:
|
Okay, I change it to Then, I can read the error messages from the channel, the error is
Does it mean vim-clap could no not found maple? Werid. |
Aside from the generatation of help tags using Rust, maple also serves as a fuzzy filter.
I think it's more likely |
Interesting, I confirmed the file is there. |
Ah, there is another tempname() inside forerunner.vim and state.vim. |
No idea how to solve it. I use |
I found proj_tags does not work, too. It shows empty list. |
Works for me, ensure you meet the requirement of |
Yes, I have both maple and universal-ctags installed. I also have vista.vim installed. |
|
Okay, I do have json support
That's werid. |
Well, I can only suggest you trying to see whether the related command works in the command line: diff --git a/autoload/clap/provider/proj_tags.vim b/autoload/clap/provider/proj_tags.vim
index 4037a0c..60d7cc8 100644
--- a/autoload/clap/provider/proj_tags.vim
+++ b/autoload/clap/provider/proj_tags.vim
@@ -7,17 +7,19 @@ set cpoptions&vim
let s:proj_tags = {}
function! s:proj_tags.on_typed() abort
- if exists('g:__clap_forerunner_tempfile')
- call clap#filter#async#dyn#from_tempfile(g:__clap_forerunner_tempfile)
- elseif exists('g:__clap_forerunner_result')
- let query = g:clap.input.get()
- if query ==# ''
- return
- endif
- call clap#filter#on_typed(function('clap#filter#sync'), query, g:__clap_forerunner_result)
- else
- call clap#filter#async#dyn#start_directly(clap#maple#build_cmd('tags', g:clap.input.get(), clap#rooter#working_dir()))
- endif
+ " if exists('g:__clap_forerunner_tempfile')
+ " call clap#filter#async#dyn#from_tempfile(g:__clap_forerunner_tempfile)
+ " elseif exists('g:__clap_forerunner_result')
+ " let query = g:clap.input.get()
+ " if query ==# ''
+ " return
+ " endif
+ " call clap#filter#on_typed(function('clap#filter#sync'), query, g:__clap_forerunner_result)
+ " else
+ let cmd = clap#maple#build_cmd('tags', g:clap.input.get(), clap#rooter#working_dir())
+ echom 'proj_tags cmd:'.join(cmd, ' ')
+ call clap#filter#async#dyn#start_directly(cmd)
+ " endif
endfunction
function! s:proj_tags.init() abort Run that command from the command line, and see what happens. |
Suddenly, it works. |
I dont' see this problem. File a new issue if you can reproduce it. You might be using a mismatched Rust binary. |
Okay, I will delete it and install again to see if the problem still there. |
You are right, it works. No error messages. |
Environment (please complete the following information):
Describe the bug
Clap help_tags
can not perform search, just showClap debug
To Reproduce
Clap help_tags
:messages
show errorvim-clap: Vim(let):E906: not an open channel
The text was updated successfully, but these errors were encountered: