Plug-in may not work if unnecessary "lazy" is set
yuki-yano opened this issue · 1 comments
yuki-yano commented
Problems summary
When "on_i" and "lazy" are set in lexima.vim, lexima does not work after the second startup.
Expected
lexima works even when "lazy" is set.
Environment Information (Required!)
-
dein.vim version(SHA1): bc75c5d
-
OS: macOS Big Sur
-
Vim/neovim version: NVIM v0.6.0-dev+308-g89db07556
Provide a minimal .vimrc with less than 50 lines (Required!)
vimrc
let s:DEIN_BASE_PATH = $HOME . '/.vim/bundle/'
let s:DEIN_PATH = expand(s:DEIN_BASE_PATH . 'repos/github.com/Shougo/dein.vim')
if !isdirectory(s:DEIN_PATH)
if executable('git')
execute '!git clone --depth=1 https://github.com/Shougo/dein.vim' s:DEIN_PATH
endif
endif
let &runtimepath .= ',' . s:DEIN_PATH
if dein#load_state(s:DEIN_BASE_PATH)
call dein#begin(s:DEIN_BASE_PATH)
call dein#add('cohama/lexima.vim', {'lazy': 1, 'on_i': 1, 'hook_post_source': 'call SetupLexima()'})
call dein#end()
call dein#save_state()
endif
if dein#check_install()
call dein#install()
endif
function! SetupLexima() abort
let s:rules = []
let s:rules += [
\ { 'char': '<BS>', 'at': '(\%#)', 'input': '<BS><Del>', },
\ ]
for s:rule in s:rules
call lexima#add_rule(s:rule)
endfor
endfunction
Dockerfile
FROM ubuntu:focal
ENV DEBIAN_FRONTEND=noninteractive
RUN apt update && apt install -y ninja-build gettext libtool libtool-bin autoconf automake cmake g++ pkg-config unzip git
WORKDIR /usr/local/src
RUN git clone https://github.com/neovim/neovim.git
WORKDIR /usr/local/src/neovim
RUN make && make install
RUN apt install -y python pip
RUN pip install neovim
RUN sh -c 'curl -fLo /root/.config/nvim/init.vim --create-dirs https://gist.githubusercontent.com/yuki-yano/31370b93bb1532fe724e88e91fa92960/raw/8b4d7c1f19cec0890d6ba3207b589c6bd8a2e617/wilder_and_lexima_test.vim'
ENTRYPOINT ["bash"]
The reproduce ways from Vim starting (Required!)
$ nvim
- Input:
(
-> Output:()
:qa
$ nvim
Input:
(-> Output:
(`
Screen shot (if possible)
Kapture.2021-09-20.at.16.41.53.mp4
Shougo commented
I get it. on_i
is already removed. Please use 'on_event': ['InsertEnter']
instead.