cohama / lexima.vim

Auto close parentheses and repeat by dot dot dot...
995 stars 46 forks source link

freeze neovim when works with yats.vim plugin at some case #84

Closed maple-leaf closed 3 years ago

maple-leaf commented 5 years ago

Neovim version: 0.3.7 OS: macOS 10.14.4

Minimal neovim config:

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

let mapleader = "\<Space>"

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 'HerringtonDarkholme/yats.vim'
Plug 'cohama/lexima.vim'

call plug#end()

Test code:

import { useState } from 'react';
function Home() {
    const [ title, setTitle ] = useState('hello');
    return (
        <>
            <Title>{title}</Title>
            <button onClick={setTitle('world')}>hello</button>
        </>
    )
}

export default Home

produce steps:

  1. move cursor to {<cursor here>setTitle
  2. type (
  3. neovim will use 9x% of CPU and freeze
cohama commented 5 years ago

Sorry, I can not repro with neovim 0.4.0. I will try nvim 0.3.7 but it takes a time.

maple-leaf commented 4 years ago

I recently upgrade neovim to HEAD version, 0.4.0. The issue gone. :-)