Skip to content
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

Clap proj_tags does not seem to work #491

Closed
rbhanot4739 opened this issue Jul 29, 2020 · 17 comments
Closed

Clap proj_tags does not seem to work #491

rbhanot4739 opened this issue Jul 29, 2020 · 17 comments
Labels
bug Something isn't working can-not-reproduce

Comments

@rbhanot4739
Copy link

Environment (please complete the following information):

  • OS: MacOs catalina 10.15.6
  • NeoVim version: 0.5.0-4496628
  • vim-clap version: latest
  • Have you reproduced with a minimal vimrc: Yes
  • Have you updated to the latest plugin version: Yes
  • Have you upgraded to/compiled the latest Rust binary: ??? Yes

Describe the bug
Running :Clap proj_tags does not seem to work at all, it opens the empty floating window with no tags listed and as soon as you start typing following error is thrown.

vim-clap: on_event:['thread ''main'' panicked at ''byte index 97 is not a char boundary; it is inside ''е'' (bytes 96...src/libcore/str/mod.rs:1920:47', 'note: run with RUST_BACKTRACE=1 environment variable to display a backtrace', '']

Clap debug


            has cargo: 1
            has maple: /Users/rbhanot/.config/nvim/plugged/vim-clap/target/release/maple
           maple info: version 0.1.19, built for x86_64-apple-darwin by rustc 1.45.0 (5c1f21c3b 2020-07-13).

         has +python3: 1
has py dynamic module: 1
     Current FileType: python
Third Party Providers: []
       Global Options:
    let g:clap#autoload_dir = '/Users/rbhanot/.config/nvim/plugged/vim-clap/autoload'
    let g:clap#provider_alias = {'gfiles': 'git_files', 'hist:': 'command_history', 'hist/': 'search_history'}
    let g:clap_cache_directory = '/Users/rbhanot/.cache/vim/clap'
    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 = 1
    let g:clap_forerunner_status_sign = {'done': '•', 'running': '!', 'using_cache': '*'}
    let g:clap_insert_mode_only = v:true
    let g:clap_layout = {'col': '17%', 'row': '33%', 'width': '67%', 'height': '33%'}
    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': ['', '']}
    let g:clap_session_dir = '/Users/rbhanot/.cache/vim/sessions'
  Provider Variables:
    let g:clap_provider_coc_blink = [2, 100]
    let g:clap_provider_grep_blink = [2, 100]
    let g:clap_provider_grep_delay = 100
    let g:clap_provider_yanks_min_len = 4

To Reproduce
Steps to reproduce the behavior:

  1. Create the minimal vimrc min.vim:
set nocompatible
set runtimepath^=/path/to/vim-clap
syntax on
filetype plugin indent on
  1. Start neovim with command: vim -u min.vim

  2. Type :Clap proj_tags

Expected behavior
The tags for the project should be displayed in the floating window.

@rbhanot4739 rbhanot4739 added the bug Something isn't working label Jul 29, 2020
@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.92. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@liuchengxu
Copy link
Owner

Just as the error message said, the Rust binary paniced. It would be helpful you can provide the exact files to reproduce this error.

@rbhanot4739
Copy link
Author

rbhanot4739 commented Jul 30, 2020

Just as the error message said, the Rust binary paniced. It would be helpful you can provide the exact files to reproduce this error.

Which exact files ?

@liuchengxu
Copy link
Owner

The source files you run :Clap proj_tags. Without these source files, I can't reproduce.

@rbhanot4739
Copy link
Author

The source files can be any file inside a project, for my case its a python file from a project.

@liuchengxu
Copy link
Owner

The source files can be any file inside a project, for my case its a python file from a project.

Nope. I never have this issue. You must provide the source files to reproduce, otherwise I can't help.

@rbhanot4739
Copy link
Author

Its happening in every project, not just one, so I believe it is irrespective of the source files.

@liuchengxu
Copy link
Owner

Can not reproduce.

@rbhanot4739
Copy link
Author

rbhanot4739 commented Jul 30, 2020

Here is a simple helloworld script from my project where i get the error.

fab = "hello"
baz = "world"


print(fab + baz)

I still don't understand how does source file has any thing to do here, since it is happening for every project. :Clap proj_tags simply shows a empty floating window and when i start to type, the error appears.

@liuchengxu
Copy link
Owner

:Clap proj_tags works great for me. If you can't provide a way to help reproduce this issue, I can't help more. It's very common that some issues happen in some particular cases.

@rbhanot4739
Copy link
Author

The error message clearly states the rust file where the error occures, src/libcore/str/mod.rs:1920:47. Further there is no way for me to reproduce this since it is not happening for some particular case/project. No matter which project I open, same issue occures for me. There is some isssue with rust itself here but since I am not familier with rust I can't debug it anymore.

vim-clap: on_event:['thread ''main'' panicked at ''byte index 97 is not a char boundary; it is inside ''е'' (bytes 96...src/libcore/str/mod.rs:1920:47', 'note: run with RUST_BACKTRACE=1 environment variable to display a backtrace', '']

@cj
Copy link

cj commented Sep 10, 2020

I have a similar issue Clap tags works just fine, but Clap proj_tags is just empty, typing does not throw an error for me.

CleanShot 2020-09-09 at 20 52 39

Please let me know the best way to get you any debug info you need!

P.S. I am using maple from doing call clap#installer#download_binary()

@liuchengxu
Copy link
Owner

@cj You can try let g:clap_enable_debug = v:true to see if there are any errors.

@mrded
Copy link

mrded commented Sep 25, 2020

I'm also having the same issues.

MacOS Catalina 10.15.6 (19G2021), NVIM v0.4.3, Ctags 5.8, cargo 1.46.0, maple 0.1.20

with a debugging enabled I see what my ctags don't support json.

image

How can I install ctags with json support? It isn't clean from the docs.

@liuchengxu
Copy link
Owner

@mrded vim-clap has declared the ctags JSON requirement for proj_tags. Refer to https://github.com/liuchengxu/vista.vim#compile-ctags-with-json-format-support for reinstalling ctags.

@liuchengxu
Copy link
Owner

I have added the ctags JSON output feature check, you'll see an error message if your ctags is not compiled with JSON support.

@mrded
Copy link

mrded commented Sep 26, 2020

Thanks. I think it will also make sense to update vim-clap docs, as instructions on how to install ctags are in a different project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working can-not-reproduce
Projects
None yet
Development

No branches or pull requests

4 participants