liuchengxu / vista.vim

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

Vista coc get an empty windows with errors. #389

Closed markwu closed 3 years ago

markwu commented 3 years ago

Describe the bug :Vista coc get an empty windows with errors.

Environment:

Vista info

    Current FileType:
Avaliable Executives: ['coc', 'ctags']
    Global Variables:
    let g:vista = {'get_tagline_under_cursor': function('82'), 'winnr': function('80'), 'source': {'fname': '', 'bufnr': 1, 'get_winid': function('84'), 'winid': 1000, 'winnr': 1, 'extension'
: function('89'), 'line': function('87'), 'get_winnr': function('83'), 'filetype': function('85'), 'lines': function('86'), 'line_trimmed': function('88'), 'scope_seperator': function('90'),
'fpath': ''}, 'provider': 'ctags', 'ctags_cmd': 'ctags --format=2 --excmd=pattern --fields=+nksSaf --extras=+F --sort=no --append=no --extras=   --output-format=json --fields=-PF -f- /var/fol
ders/y2/qvr3832j08340b8y6sbdv6dm0000gn/T/aa5f52ac5d7b6bbe8de460624823e23126a4f22977de49208ccbb66da75a32ef', 'winid': function('81'), 'tmps': []}
    let g:vista#executive#ctags#support_json_format = 1
    let g:vista#executives = ['ale', 'coc', 'ctags', 'lcn', 'nvim_lsp', 'vim_lsc', 'vim_lsp']
    let g:vista#extensions = ['markdown', 'rst']
    let g:vista#finders = ['clap', 'fzf', 'skim']
    let g:vista_blink = [2, 100]
    let g:vista_close_on_fzf_select = 0
    let g:vista_close_on_jump = 0
    let g:vista_cursor_delay = 400
    let g:vista_default_executive = 'ctags'
    let g:vista_disable_statusline = 0
    let g:vista_echo_cursor = 1
    let g:vista_enable_centering_jump = 1
    let g:vista_executive_for = {}
    let g:vista_find_absolute_nearest_method_or_function = 0
    let g:vista_find_nearest_method_or_function_delay = 300
    let g:vista_fold_toggle_icons = ['▼', '▶']
    let g:vista_fzf_preview = []
    let g:vista_icon_indent = ['└ ', '│ ']
    let g:vista_ignore_kinds = []
    let g:vista_log_file = '/Users/markwu/vista.log'
    let g:vista_no_mappings = 0
    let g:vista_sidebar_position = 'vertical botright'
    let g:vista_sidebar_width = 30
    let g:vista_stay_on_open = 1
    let g:vista_top_level_blink = [2, 100]
    let g:vista_update_on_text_changed = 0
    let g:vista_update_on_text_changed_delay = 500

Steps to reproduce given the above info

set nocompatible
set nocompatible
filetype off

source ~/.vim/bundle/vim-plug/plug.vim
call plug#begin('~/.vim/bundle/')

Plug 'junegunn/vim-plug'
Plug 'liuchengxu/vista.vim'
Plug 'neoclide/coc.nvim', {'branch': 'release'}

call plug#end()

let g:vista_log_file = expand('~/vista.log')

syntax on
filetype plugin indent on

Steps and errors vista

Vista logs

2021-02-17 21:36:36 ["executive::ctags::s:BuildCmd origin_fpath:/Users/markwu/.dot_vim/bundle/vista.vim/autoload/vista.vim"]
2021-02-17 21:36:36 ["executive::ctags::s:ApplyExecute calling s:RunAsyncCommon(ctags --format=2 --excmd=pattern --fields=+nksSaf --extras=+F --sort=no --append=no --extras=  --language-force=vim --vim-kinds=acfvmn --output-format=json --fields=-PF -f- /var/folders/y2/qvr3832j08340b8y6sbdv6dm0000gn/T/b6dbbd5f75398f3646dcf75a9e511e54cd7fd5695aff337cc7a093d58755d808.vim)"]
2021-02-17 21:36:36 ["executive::ctags::s:ApplyExtracted s:fpath:/Users/markwu/.dot_vim/bundle/vista.vim/autoload/vista.vim, s:reload_only:v:false, s:should_display:v:true"]
2021-02-17 21:36:36 ["[LSPProcess]should_display, processed_data:{'function': [{'lnum': 7, 'text': 'vista#FindItemsUnderDirectory', 'signature': '(dir)'}, {'lnum': 18, 'text': 'vista#ShouldSkip', 'signature': '()'}, {'lnum': 25, 'text': 'vista#ShouldIgnore', 'signature': '(kind)'}, {'lnum': 29, 'text': 'vista#SetProvider', 'signature': '(provider)'}, {'lnum': 38, 'text': 'vista#OnExecute', 'signature': '(provider,AUF)'}, {'lnum': 44, 'text': 'vista#Sort', 'signature': '()'}, {'lnum': 65, 'text': 'vista#AutoUpdateWithDelay', 'signature': '(Fn,Args)'}, {'lnum': 69, 'text': 'vista#GetExplicitExecutive', 'signature': '(filetype)'}, {'lnum': 81, 'text': 'vista#GetExplicitExecutiveOrDefault', 'signature': '()'}, {'lnum': 93, 'text': 's:TryInitializeVista', 'signature': '()'}, {'lnum': 110, 'text': 'vista#RunForNearestMethodOrFunction', 'signature': '()'}, {'lnum': 122, 'text': 'vista#Debug', 'signature': '(...)'}, {'lnum': 128, 'text': 's:HandleSingleArgument', 'signature': '(arg)'}, {'lnum': 160, 'text': 's:HandleArguments', 'signature': '(fst,snd)'}, {'lnum': 192, 'text': 'vista#', 'signature': '(bang,...)'}], 'variable': [{'lnum': 5, 'text': 's:cur_dir'}, {'lnum': 11, 'text': 'g:vista#finders'}, {'lnum': 12, 'text': 'g:vista#executives'}, {'lnum': 13, 'text': 'g:vista#extensions'}, {'lnum': 15, 'text': 's:ignore_list'}, {'lnum': 31, 'text': 'g:vista'}, {'lnum': 34, 'text': 'g:vista'}, {'lnum': 46, 'text': 'g:vista'}, {'lnum': 48, 'text': 'g:vista'}, {'lnum': 120, 'text': 's:logging_enabled'}, {'lnum': 131, 'text': 'g:vista'}, {'lnum': 149, 'text': 'g:vista'}, {'lnum': 200, 'text': 'g:vista'}, {'lnum': 209, 'text': 'g:vista'}]}"]
2021-02-17 21:36:36 ["event.BufEnter",2,"/Users/markwu/Projects/vim-test/__vista__"]
2021-02-17 21:36:45 ["event.BufEnter",1,"/Users/markwu/.dot_vim/bundle/vista.vim/autoload/vista.vim"]
2021-02-17 21:36:45 ["event.BufEnter processing auto update for buffer 1"]
markwu commented 3 years ago

After I installing coc-vimlsp, I still get errors but tags window shows after I switch windows. But I can't jump to any where from tags window.

Steps and errors vista

Vista logs

2021-02-17 21:43:28 ["event.BufEnter",1,"/Users/markwu/.dot_vim/bundle/vista.vim/autoload/vista.vim"]
2021-02-17 21:43:28 ["event.BufEnter processing auto update for buffer 1"]
2021-02-17 21:43:28 ["[LSPProcess]should_display, processed_data:[{'lnum': 5, 'col': 5, 'level': 0, 'kind': 'Variable', 'text': 's:cur_dir'}, {'lnum': 7, 'col': 1, 'level': 0, 'kind': 'Function', 'text': 'vista#FindItemsUnderDirectory'}, {'lnum': 15, 'col': 5, 'level': 0, 'kind': 'Variable', 'text': 's:ignore_list'}, {'lnum': 18, 'col': 1, 'level': 0, 'kind': 'Function', 'text': 'vista#ShouldSkip'}, {'lnum': 25, 'col': 1, 'level': 0, 'kind': 'Function', 'text': 'vista#ShouldIgnore'}, {'lnum': 29, 'col': 1, 'level': 0, 'kind': 'Function', 'text': 'vista#SetProvider'}, {'lnum': 31, 'col': 9, 'level': 1, 'kind': 'Variable', 'text': 'g:vista.skip_set_provider'}, {'lnum': 34, 'col': 7, 'level': 1, 'kind': 'Variable', 'text': 'g:vista.provider'}, {'lnum': 38, 'col': 1, 'level': 0, 'kind': 'Function', 'text': 'vista#OnExecute'}, {'lnum': 44, 'col': 1, 'level': 0, 'kind': 'Function', 'text': 'vista#Sort'}, {'lnum': 46, 'col': 9, 'level': 1, 'kind': 'Variable', 'text': 'g:vista.sort'}, {'lnum': 48, 'col': 9, 'level': 1, 'kind': 'Variable', 'text': 'g:vista.sort'}, {'lnum': 51, 'col': 7, 'level': 1, 'kind': 'Variable', 'text': 'cache'}, {'lnum': 53, 'col': 7, 'level': 1, 'kind': 'Variable', 'text': 'cur_pos'}, {'lnum': 65, 'col': 1, 'level': 0, 'kind': 'Function', 'text': 'vista#AutoUpdateWithDelay'}, {'lnum': 69, 'col': 1, 'level': 0, 'kind': 'Function', 'text': 'vista#GetExplicitExecutive'}, {'lnum': 81, 'col': 1, 'level': 0, 'kind': 'Function', 'text': 'vista#GetExplicitExecutiveOrDefault'}, {'lnum': 82, 'col': 7, 'level': 1, 'kind': 'Variable', 'text': 'explicit_executive'}, {'lnum': 85, 'col': 9, 'level': 1, 'kind': 'Variable', 'text': 'executive'}, {'lnum': 87, 'col': 9, 'level': 1, 'kind': 'Variable', 'text': 'executive'}, {'lnum': 93, 'col': 1, 'level': 0, 'kind': 'Function', 'text': 's:TryInitializeVista'}, {'lnum': 110, 'col': 1, 'level': 0, 'kind': 'Function', 'text': 'vista#RunForNearestMethodOrFunction'}, {'lnum': 120, 'col': 5, 'level': 0, 'kind': 'Variable', 'text': 's:logging_enabled'}, {'lnum': 122, 'col': 1, 'level': 0, 'kind': 'Function', 'text': 'vista#Debug'}, {'lnum': 128, 'col': 1, 'level': 0, 'kind': 'Function', 'text': 's:HandleSingleArgument'}, {'lnum': 131, 'col': 9, 'level': 1, 'kind': 'Variable', 'text': 'g:vista.lnum'}, {'lnum': 149, 'col': 11, 'level': 1, 'kind': 'Variable', 'text': 'g:vista.lnum'}, {'lnum': 160, 'col': 1, 'level': 0, 'kind': 'Function', 'text': 's:HandleArguments'}, {'lnum': 167, 'col': 11, 'level': 1, 'kind': 'Variable', 'text': 's:finder_args_pattern'}, {'lnum': 170, 'col': 11, 'level': 1, 'kind': 'Variable', 'text': 'matched'}, {'lnum': 171, 'col': 11, 'level': 1, 'kind': 'Variable', 'text': 'finder'}, {'lnum': 172, 'col': 11, 'level': 1, 'kind': 'Variable', 'text': 'executive'}, {'lnum': 179, 'col': 11, 'level': 1, 'kind': 'Variable', 'text': 'finder'}, {'lnum': 180, 'col': 11, 'level': 1, 'kind': 'Variable', 'text': 'executive'}, {'lnum': 182, 'col': 11, 'level': 1, 'kind': 'Variable', 'text': 'finder'}, {'lnum': 183, 'col': 11, 'level': 1, 'kind': 'Variable', 'text': 'executive'}, {'lnum': 200, 'col': 7, 'level': 0, 'kind': 'Variable', 'text': 'g:vista.source.winid'}, {'lnum': 209, 'col': 13, 'level': 0, 'kind': 'Variable', 'text': 'g:vista.lnum'}]"]
markwu commented 3 years ago

Thanks! I confirm it fixed.