Skip to content

Instantly share code, notes, and snippets.

@jubnzv
Created July 10, 2019 04:46
Show Gist options
  • Save jubnzv/fc362de0776c4f0e2569e196f6c3f0ae to your computer and use it in GitHub Desktop.
Save jubnzv/fc362de0776c4f0e2569e196f6c3f0ae to your computer and use it in GitHub Desktop.
call plug#begin('~/.local/share/nvim/plugged')
Plug 'liuchengxu/vista.vim'
Plug 'itchyny/lightline.vim'
call plug#end()
let g:lightline = {
\ 'colorscheme': 'gruvbox',
\ 'active': {
\ 'left': [ [ 'mode', 'paste' ],
\ [ 'readonly', 'filename', 'modified' ],
\ [ 'method' ] ],
\ 'right': [ [ 'lineinfo' ],
\ [ 'percent' ],
\ [ 'fileformat', 'fileencoding', 'filetype' ] ],
\ },
\ 'component_function': {
\ 'method': 'NearestMethodOrFunction'
\ },
\ }
set tags=./tags;
let g:vista_default_executive = 'ctags'
let g:vista_fzf_preview = ['right:50%']
" Show current method name in lightline
function! NearestMethodOrFunction() abort
let l:method = get(b:, 'vista_nearest_method_or_function', '')
if l:method != ''
let l:method = '[' . l:method . ']'
endif
return l:method
endfunction
autocmd VimEnter * call vista#RunForNearestMethodOrFunction()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment