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

Auto-open Vista window when starting with vim_lsp #451

Open
spearman opened this issue Feb 9, 2023 · 1 comment
Open

Auto-open Vista window when starting with vim_lsp #451

spearman opened this issue Feb 9, 2023 · 1 comment

Comments

@spearman
Copy link

spearman commented Feb 9, 2023

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

@spearman
Copy link
Author

spearman commented Feb 9, 2023

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()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant