Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected behaviour on Neovim with ALE #154

Open
ottijp opened this issue Jul 12, 2024 · 4 comments
Open

Unexpected behaviour on Neovim with ALE #154

ottijp opened this issue Jul 12, 2024 · 4 comments

Comments

@ottijp
Copy link

ottijp commented Jul 12, 2024

I found a unexpected behaviour on Neovim when using this plugin with ALE.
I'm not sure which causes this problem.

I would like to know how to fix this problem or if there is a workaround.

Problem

When I insert [] on each line in visual mode, the expected result is as follows:

[] hoge
[] piyo

However, I got the following result:

[] hoge
pi hoyo
lexima-reproduction.mov

This only occurs when I insert [] (with an additional space after the closing square bracket), but not when I insert [].

Reproduction

Before starting NeoVim:

git clone https://github.com/cohama/lexima.vim
git clone https://github.com/dense-analysis/ale

My init.vim:

set rtp+=lexima.vim
set rtp+=ale

Start NeoVim:

nvim -u init.vim

And type the following:

ihoge<CR>piyo<ESC>k^<C-v>jI[<Right> <ESC>

Environment

  • OS: macOS 13.5
  • NeoVim: 0.10.0
  • ALE: 48d73c87c3c321e6298755abc5449267192d07e6(Fri Jul 12 03:40:38 2024 +0300)
  • lexima: 5513d68(Wed Dec 20 13:10:40 2023 +0900)
$ sw_vers
ProductName:            macOS
ProductVersion:         13.5
BuildVersion:           22G74

$ nvim --version
NVIM v0.10.0
Build type: Release
LuaJIT 2.1.1716656478
Run "nvim -V1 -v" for more info

The problem occurs only in combination of Neovim and ALE.

with ALE problem occurs
Vim false false
Vim true false
NeoVim false false
NeoVim true true
@cohama
Copy link
Owner

cohama commented Jul 12, 2024

Thanks for your report. I could reproduce this issue.

@cohama
Copy link
Owner

cohama commented Jul 12, 2024

I think this issue is probably hard to fix. I have no idea why using with ALE causes this issue, and why vim is no problem.

@cohama
Copy link
Owner

cohama commented Jul 12, 2024

Workaround is using <C-g>U<Right> instead of just <Right>. (See also :help i_CTRL-G_U)

<Right> (or any other cursor move keys) will break undo block. I think undo block is related to this issue.

@ottijp
Copy link
Author

ottijp commented Jul 13, 2024

Thank you for your investigation.
Although I don't fully understand the details about the undo block, I have confirmed that the workaround works.

By the way, I really appreciate your efforts in developing and maintaining this handy plugin.
It helps me every day! 😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants