brooth/far.vim

neovim freeze when combine far with yats.vim

maple-leaf opened this issue · 1 comments

minimal config:

if empty($XDG_DATA_HOME)
    let $XDG_DATA_HOME = $HOME . '/.config'
endif

let mapleader = "\<Space>"

source $XDG_DATA_HOME/nvim/helper.vim
source $XDG_DATA_HOME/nvim/setting.vim

function! s:checkPlug()
	let vimplug_exists=expand('~/.config/nvim/autoload/plug.vim')

	if !filereadable(vimplug_exists)
	  if !executable("curl")
	    echoerr "You have to install curl or first install vim-plug yourself!"
	    execute "q!"
	  endif
	  echo "Installing Vim-Plug..."
	  echo ""
	  silent !\curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
	  let g:not_finish_vimplug = "yes"

	  autocmd VimEnter * PlugInstall
	endif
endfunction

call s:checkPlug()

" Required:
call plug#begin(expand('~/.config/nvim/plugged'))

Plug 'brooth/far.vim'
Plug 'HerringtonDarkholme/yats.vim'

no <leader>R :Far 
let g:far#source = 'agnvim'
" fix scrolling issue in results
set regexpengine=1
" nvim will be in fake-freeze in some situation, press 'q' to recover

call plug#end()

nvim test.tsx, and type console.log( below first line (const icons =...), then neovim will freeze, you can make neovim back again with ctrl+c, then neovim will freeze again.

// test.tsx
const icons = require.context('../icons', false, /\.svg$/);

icons.keys().forEach(key => {
    console.log(key, icons[key], icons['cat']);
});
console.log(icons);

export default icons;

I try this again, and find that it ssems caused by set regexpengine=1 setting. The issue gone when remove this setting.