liuchengxu / vista.vim

:cactus: Viewer & Finder for LSP symbols and tags
https://liuchengxu.github.io/vista.vim
MIT License
1.9k stars 86 forks source link

clap tags not working - Undefined variable: s:data #208

Closed learner-beep closed 4 years ago

learner-beep commented 4 years ago

_Instructions: 1. Install vim-clap and vista.vim 2.Execute :Clap tags OR :Clap tags ++e=fzf - Both result in the error and no popup comes. (FYI - remaining all :Clap commands works fine)

Error detected while processing function clap#[27]..clap#for[23]..clap#popup#open[13]..clap#_init[10]..652[11]..vista#finder#GetSymbols[26]..vista#executive#ctags#Run[1]..293_Dispatch[11]..293_Run: line 11: E121: Undefined variable: s:data Error detected while processing function clap#[27]..clap#for[23]..clap#popup#open[13]..clap#_init[10]..652: line 11: E714: List required Press ENTER or type command to continue Error detected while processing function 286_popup_filter[21]..640: line 1: E121: Undefined variable: s:display_winid Press ENTER or type command to continue Error detected while processing function 286_popup_filter[21]..640: line 1: E116: Invalid arguments for function popup_getpos(s:display_winid) Press ENTER or type command to continue

Environment (please complete the following information): OS: Centos 7 Vim version: 8.1-2410 vim-clap version: Dec 15 commit - a2ee49ec87197dd90c4924563e6c476c8448e798 Have you reproduced with a minimal vimrc: yes

issue-label-bot[bot] commented 4 years ago

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

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

liuchengxu commented 4 years ago

Can not reproduce with this minimal vimrc:

set nocompatible
set runtimepath^=~/.vim/plugged/vim-clap
set runtimepath^=~/.vim/plugged/vista.vim
syntax on
filetype plugin indent on
learner-beep commented 4 years ago
set nocompatible
set runtimepath^=~/.vim/plugged/vim-clap
set runtimepath^=~/.vim/plugged/vista.vim
syntax on
filetype plugin indent on

Thanks for quick reply ! But still able to get the same problem , with the above minimal vimrc:

vista.vim : Dec 15 commit : 5538f9bc62beecb68f4ab1be63f92e77bd2c93f0

[vista.vim] Fail to run ctags: ctags --format=2 --excmd=pattern --fields=nksSaf --file-scope=yes --sort=no --append=no --extras= -f- /tmp/vista.vim_ctags_tmp/236433cb3a21e67a2f5422510ab455f9f0d18e7aa0c37954ee0 1241c6d680629 Error detected while processing function clap#[27]..clap#for[23]..clap#popup#open[13]..clap#_init[10]..260[11]..vista#finder#GetSymbols[26]..vista#executive#ctags#Run[1]..43_Dispatch[11]..43_Run: line 11: E121: Undefined variable: s:data Error detected while processing function clap#[27]..clap#for[23]..clap#popup#open[13]..clap#_init[10]..260: line 11: vim-clap: clap#handler#sink: Vim(let):E684: list index out of range: 0

learner-beep commented 4 years ago

VIM - Vi IMproved 8.1 (2018 May 18, compiled Dec 8 2019 18:06:18) Included patches: 1-2410 Compiled by A@ Huge version with GTK2 GUI. Features included (+) or not (-): +acl -farsi -mouse_sysmouse -tag_old_static +arabic +file_in_path +mouse_urxvt -tag_any_white +autocmd +find_in_path +mouse_xterm +tcl +autochdir +float +multi_byte +termguicolors +autoservername +folding +multi_lang +terminal +balloon_eval -footer -mzscheme +terminfo +balloon_eval_term +fork() +netbeans_intg +termresponse +browse +gettext +num64 +textobjects ++builtin_terms -hangul_input +packages +textprop +byte_offset +iconv +path_extra +timers +channel +insert_expand +perl +title +cindent +job +persistent_undo +toolbar +clientserver +jumplist +popupwin +user_commands +clipboard +keymap +postscript +vartabs +cmdline_compl +lambda +printer +vertsplit +cmdline_hist +langmap +profile +virtualedit +cmdline_info +libcall +python/dyn +visual +comments +linebreak +python3/dyn +visualextra +conceal +lispindent +quickfix +viminfo +cryptv +listcmds +reltime +vreplace +cscope +localmap +rightleft +wildignore +cursorbind +lua +ruby/dyn +wildmenu +cursorshape +menu +scrollbind +windows +dialog_con_gui +mksession +signs +writebackup +diff +modify_fname +smartindent +X11 +digraphs +mouse -sound -xfontset +dnd +mouseshape +spell +xim -ebcdic +mouse_dec +startuptime +xpm +emacs_tags -mouse_gpm +statusline +xsmp_interact +eval -mouse_jsbterm -sun_workshop +xterm_clipboard +ex_extra +mouse_netterm +syntax -xterm_save +extra_search +mouse_sgr +tag_binary
system vimrc file: "$VIM/vimrc" user vimrc file: "$HOME/.vimrc" 2nd user vimrc file: "~/.vim/vimrc" user exrc file: "$HOME/.exrc" system gvimrc file: "$VIM/gvimrc" user gvimrc file: "$HOME/.gvimrc" 2nd user gvimrc file: "~/.vim/gvimrc" defaults file: "$VIMRUNTIME/defaults.vim" system menu file: "$VIMRUNTIME/menu.vim" fall-back for $VIM: "/usr/share/vim" Compilation: gcc -std=gnu99 -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng15 -I/usr/include/uuid -I/usr/include/pixman-1 -I/usr/include/libdrm -fPIC -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -std=gnu99 -L. -Wl,-z,relro -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,--enable-new-dtags -Wl,-rpath,/usr/lib64/perl5/CORE -L/usr/local/lib -Wl,--as-needed -o vim -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfontconfig -lgobject-2.0 -lglib-2.0 -lfreetype -lSM -lICE -lXpm -lXt -lX11 -lSM -lICE -lm -lnsl -lncurses -ldl -L/usr/lib -llua -Wl,--enable-new-dtags -Wl,-rpath,/usr/lib64/perl5/CORE -fstack-protector -L/usr/lib64/perl5/CORE -lperl -lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc -L/usr/lib64 -ltcl8.5 -ldl -lpthread -lieee -lm

liuchengxu commented 4 years ago

It's more like a vista issue, so I tranferred it to this repo.

Can you also provide the sample file your error occured to reproduce?

learner-beep commented 4 years ago

If there is any verbose flag to enable logging or any otherway to troubleshoot, please let me know

liuchengxu commented 4 years ago

What you have descirbed does not help reproduce this issue. vista.vim does not need tha TAGS files as all is in memeory.

Try pasting the output of :Vista info when you see this error.

learner-beep commented 4 years ago

After the error , then :Vista info , gives below output

Current FileType: python Avaliable Executives: ['coc', 'ctags'] Global Variables: let g:vista#executive#ctags#support_json_format = 0 let g:vista#executives = ['ale', 'coc', 'ctags', 'lcn', 'nvim_lsp', 'tags', 'vim_lsc', 'vim_lsp'] let g:vista#finders = ['fzf', 'skim'] let g:vista#renderer#enable_icon = 1 let g:vista#renderer#icons = {'function': '', 'variable': ''} let g:vista_ctags_cmd = {'haskell': 'hasktags -x -o - -c'} let g:vista_default_executive = 'ctags' let g:vista_executive_for = {'php': 'vim_lsp', 'cpp': 'vim_lsp'} let g:vista_fzf_preview = ['right:50%'] let g:vista_icon_indent = ['╰─▸ ', '├─▸ ']

liuchengxu commented 4 years ago

Not sure if you are using the right ctags, note that only https://github.com/universal-ctags/ctags is supported. What does ctags --version say?

learner-beep commented 4 years ago

Amazing ! BTW its a very nice plugin you have developed. Congrats ! Thank you !

I was using wrong one(below - exuberant ). After installing universal, it works fine.

Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert Compiled: May 1 2014, 03:27:17 Addresses: dhiebert@users.sourceforge.net, http://ctags.sourceforge.net Optional compiled features: +wildcards, +regex

learner-beep commented 4 years ago

One doubt :

Can the below file types be supported ? maybe its ctags limitation, but if there is a workaround to support below , it would be great !

html yaml (although it works for json) ts shell script groovy,scala