ycm-core / YouCompleteMe

A code-completion engine for Vim
http://ycm-core.github.io/YouCompleteMe/
GNU General Public License v3.0
25.36k stars 2.8k forks source link

ycm go support #4195

Closed bethebest0622 closed 8 months ago

bethebest0622 commented 8 months ago

I used ycm in vim. it worked very well in cpp.

recently, i need to setup go language.

python install.py --clang-completer --go-completer it's ok to build.

but I cant jump to defineordeclare, if the place is an imported package.

could you help on this?

is there anything i should set to make the import path works? for example: ycm_extara.cfg

bstaletic commented 8 months ago

Can you try doing :YcmCompleter GoTo here?

When I do that I end up jumping to /usr/lib/go/src/log/log.go.

bethebest0622 commented 8 months ago

i am online, let me try now

bethebest0622 commented 8 months ago

@bstaletic i can't, the error msg from ycm is: ValueError: No JSON object could be decoded

bethebest0622 commented 8 months ago

Can you try doing :YcmCompleter GoTo here?

When I do that I end up jumping to /usr/lib/go/src/log/log.go.

hello?

puremourning commented 8 months ago

Please see CONTRIBUTING.md

bstaletic commented 8 months ago

Python2/RHEL setup is... tough. We do have a legacy-py2 branch, but I suggest using a virtualenv for python and updating YCM.