Skip to content
This repository has been archived by the owner on Jul 27, 2018. It is now read-only.

Trailing whitespace with g:cm_matcher and nsf/gocode #165

Open
namedots opened this issue Dec 9, 2017 · 0 comments
Open

Trailing whitespace with g:cm_matcher and nsf/gocode #165

namedots opened this issue Dec 9, 2017 · 0 comments

Comments

@namedots
Copy link

namedots commented Dec 9, 2017

I've run into a rather strange bug with g:cm_matcher and nsf/gocode
Maybe it's nsf/gocode's bug. the g:cm_matcher interaction is strange though, possibly doing something needed to reproduce the issue for nsf/gocode, and I wouldn't know where to start with a bug report for nsf/gocode

The bug looks like this:
https://asciinema.org/a/CuDs6CEXQJYn0ueiutCYqCgIc
(the red-marked trailing whitespace shouldn't be there, it should have been removed when I left that line)

Reproducing the bug in a minimal environment:

curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
pip3 install --user neovim jedi psutil setproctitle
go get github.com/nsf/gocode
export PATH=~/go/bin:$PATH

With a vimrc like this:

call plug#begin('~/.config/nvim/plugged')
Plug 'roxma/nvim-completion-manager'
let g:cm_matcher = {
        \ 'module': 'cm_matchers.fuzzy_matcher',
        \ 'case': 'smartcase'
        \}
call plug#end()

With the configuration complete, the bug doesn't yet occur.
However, after writing a hello world program in go:

package main
import "fmt"
func main() {
    fmt.Println("hello world")
}

Presumably getting something to change about nsf/gocode's persistent state in the filesystem...

Now, after opening nvim (no file needed), and typing:

    hello

(indented and then a word)

followed by ENTER (ctrl m) twice -- this causes trailing whitespace on the line after hello.

Removing the g:cm_matcher part in the vimrc stops this behaviour.
Happens for both abbrev_matcher and fuzzy_matcher

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

No branches or pull requests

1 participant