Skip to content

Auto-open Vista window when starting with vim_lsp #451

@spearman

Description

@spearman

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

Activity

spearman

spearman commented on Feb 9, 2023

@spearman
Author

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @spearman

        Issue actions

          Auto-open Vista window when starting with vim_lsp · Issue #451 · liuchengxu/vista.vim