liuchengxu / vista.vim

:cactus: Viewer & Finder for LSP symbols and tags

Home Page:https://liuchengxu.github.io/vista.vim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Auto-open Vista window when starting with vim_lsp

spearman opened this issue · comments

Is your feature request related to a problem? Please describe.
Would like to automatically have the Vista window visible when starting to edit a file with vim-lsp. When using

let g:vista_default_executive = 'vim_lsp'
autocmd VimEnter * Vista

nothing happens.

Describe the solution you'd like
Would like the above config to work.

Describe alternatives you've considered
Maybe it needs to be triggered when vim_lsp finishes loading symbols, but I don't know how to do this.

Additional context

This kind of works:

let g:vista_default_executive = 'vim_lsp'
function! OpenVista()
  if !exists("g:opened_vista")
    Vista
    if vista#sidebar#IsOpen()
      let g:opened_vista = 1
    endif
  endif
endfunction
autocmd User lsp_diagnostics_updated call OpenVista()