iamcco/vim-language-server

Function name can start with '_'

xieshiyao opened this issue · 3 comments

I got the error shown in the picture in my .vimrc, but actually, this function works fine with either vim or neovim. I know that (neo)vim's document eval.txt says that a function name must start with a capital, but I think it's just a problem with that document.

Screenshot from 2019-07-21 11-14-41

I start the function name with _ for two reasons:

  1. This way, it will never conflict with functions defined by plugins I installed

  2. I map it to some keys, so will never need to call it by name and I don't want to see any autocompletion about it when I type :call V<Tab>


After readinginit.vim written by someone else, I realize that what I should do is to apply :s/_/s:/to my function name. But I still consider this as inconsistency between implementaion and document. What do you think about it?
@justinmk

This error is throw by https://github.com/vim-jp/vim-vimlparser, i think @tyru should also have a look at on this.

tyru commented

@iamcco please file issue if that's a vimlparser's bug.

tyru commented

Ah okay, I got it.
I created issue. vim-jp/vim-vimlparser#133