chxuan / vimplus

:rocket:An automatic configuration program for vim
https://github.com/chxuan/vimplus
MIT License
3.89k stars 1.13k forks source link

Update YCM branch from personal to public maintained one #401

Open TCoherence opened 1 year ago

TCoherence commented 1 year ago

最近在配置环境被人推荐了这个repo,实话实说还是很不错的,但是因为没什么人维护导致一些repo其实已经outdated但是没人发现,今天用M1 Mac配置环境一直在YCM那里报错

...
info: downloading installer
info: profile set to 'default'
info: default host triple is aarch64-apple-darwin
info: skipping toolchain installation

Rust is installed now. Great!

To get started you need Cargo's bin directory
(/var/folders/b1/0fd1b6hs7lz0fm_mh346lybm0000gn/T/rust_install_j921p9m6/bin) in
your PATH
environment variable. This has not been done automatically.

To configure your current shell, run:
source
"/var/folders/b1/0fd1b6hs7lz0fm_mh346lybm0000gn/T/rust_install_j921p9m6/env"
info: syncing channel updates for 'nightly-2019-06-06-aarch64-apple-darwin'
info: latest update on 2019-06-06, rust version 1.37.0-nightly (7cdaffd79 2019-06-05)
error: target 'aarch64-apple-darwin' not found in channel.  Perhaps check https://doc.rust-lang.org/nightly/rustc/platform-support.html for available targets

首先发现这是version问题,然后一直在找找了很久才找到应该如何update hardcoded的version,https://gist.github.com/bobsomers/f733711b239d32268cb6dcbd87d44568,想着给大家提个醒然后在原作者的repo里面提了一个issue,最后发现我这个branch根本不是原作者的branch,是vimplus作者自己fork在gitee上面的。继续找了一会发现ycm其实是在install.sh里面就pull下来的并不是在vundle里面来的。。

如果可以把这个update一下或者直接去掉就好了,不然M1同学真的很难受,而且没有和原作者保持同步之后肯定也会有新的问题的。。。

问题code:https://github.com/chxuan/vimplus/blob/master/install.sh#L490

TCoherence commented 1 year ago

今天弄的差不多了回来回复一下,可以通过以下步骤卸载当前的ycm(因为安装的时候就会默认安装作者自己gitee上的branch,当然你也可以直接去install.sh里面注释或者删除掉这个)

打开~/.vimrc 注释掉YCM那个plug,大概格式为”Plug: xxx/YouCompleteMe" 运行 “:PlugClean" 去~/.vim/plugged下面删除youcompleteme这个folder 重新git clone 原repo的YouCompleteMe到该地方 重新去~./.vimrc改掉之前YCM的注释 最后按照YouCompleteMe官网的方式安装就好了。 YouCompleteMe github repo: https://github.com/ycm-core/YouCompleteMe

TCoherence commented 1 year ago

这里有一个open的PR:https://github.com/chxuan/vimplus/pull/394/commits