eraserhd / parinfer-rust

A Rust port of parinfer.
ISC License
546 stars 42 forks source link

Doesn't work with neovim 0.6 and above? #121

Closed xlfe closed 2 years ago

xlfe commented 2 years ago

I was using parinfer-rust with great success using nvim 0.5.1, but after upgrading I'm seeing lots of bugs (tried version 0.6.0, 0.6.1 and 0.7.0 ie nightly)

Reverting my setup to 0.5.1 fixes the issues I'm seeing.

If you can't reproduce just ping me and I'll put together a minimal reproducible example

jlesquembre commented 2 years ago

I'm on 0.6.1, I don't see any errors

xlfe commented 2 years ago

Ah okay. I'll do some more debugging!

xlfe commented 2 years ago

Okay, minimal reproduction

Repro

FROM rust:latest as builder

# Install dependencies
RUN apt update && \
    apt install -y \
    git \
    curl \
    python3 \
    python3-pip \
    python3-dev 

RUN mkdir -p ~/.vim/autoload ~/.vim/bundle && \
    curl -LSso ~/.vim/autoload/pathogen.vim https://raw.githubusercontent.com/tpope/vim-pathogen/master/autoload/pathogen.vim && \
    cd ~/.vim/bundle && git clone https://github.com/eraserhd/parinfer-rust.git && cd parinfer-rust && cargo build --release

RUN mkdir -p ~/.config/nvim/ && \
    echo "set runtimepath^=~/.vim runtimepath+=~/.vim/after" > ~/.config/nvim/init.vim && \
    echo "let &packpath = &runtimepath" >> ~/.config/nvim/init.vim && \
    echo "source ~/.vimrc" >> ~/.config/nvim/init.vim

RUN printf 'execute pathogen#infect()\n\
syntax on\n\
filetype plugin indent on\n'\
>> /root/.vimrc

WORKDIR /root/

RUN printf '(ns example.test\n\
  (:require\n\
    [medley.core :as medley]\n\
    [edn-query-language.core :as eql]))\n'\ 
>> /root/example.clj

ARG NVIM_VERSION=0.5.1

RUN curl -LO https://github.com/neovim/neovim/releases/download/v$NVIM_VERSION/nvim-linux64.tar.gz && \
    gzip -cd nvim-linux64.tar.gz | tar xvf - --strip-components=1 -C /usr/local && rm nvim-linux64.tar.gz && chmod +x /usr/local/bin/nvim

ENTRYPOINT ["/usr/local/bin/nvim", "/root/example.clj"]

Works

docker build -t parinfer-repro --build-arg NVIM_VERSION=0.5.1 -f Reprod . && docker run -it parinfer-repro

Doesn't work

docker build -t parinfer-repro --build-arg NVIM_VERSION=0.6.1 -f Reprod . && docker run -it parinfer-repro

My test is to try to copy and paste a line ie Y then p

Video https://youtu.be/EeYcF37H60w

xlfe commented 2 years ago

My bad, this wasn't a parinfer-rust (or neovim) bug, I was bitten by https://github.com/neovim/neovim/pull/13268