Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix ycm compile #394

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

fix ycm compile #394

wants to merge 3 commits into from

Conversation

shinlw
Copy link

@shinlw shinlw commented May 26, 2022

目前安装时的ycm编译处于不可用状态,亟需修复

  1. 在编译ycm时,原本的语法会跳过Alpine以外系统的编译;
  2. 即使修改了这部分逻辑或者去~/.vim/plugged/YouCompleteMe/下手动编译,使用--clangd-completer或--clang-completer参数也会失败,原因是旧版的ycm编译需要从去年已停运的dl.bintray.com下载所需文件。这将导致编译时必定会走到rebuild without Clang分支;
  3. 以上两点应是ycmd server shut down频发的主要原因。为解决这个问题,我将ycm的git源替换为GitHub以获取最新版本。最新的ycm要求vim版本在8.1以上并只支持python3,所以一并替换了vim源并将vim编译参数修改为python3(同时支持python3和2不可行)
  4. 将--clang-completer参数改为开发者建议的--clangd-completer
  5. 移除了不支持的python2编译方式
  6. 由于ycm要求vim8.1或更高版本,将使用原系统vim的Ubuntu版本提高到20.04
  7. 在macOS上安装universal-ctags替代ctags-exuberant
    ...

已知问题:新版ycm编译要求CMake版本在3.16及以上,若CMake版本不足需要手动更新CMake

至于更换GitHub源后可能碰到的下载问题:这和其它插件是一样的,若不能访问GitHub之后安装其他插件也全部会出错

已在Ubuntu 20.04 LTS及Arch上通过测试,Ubuntu 18.04可能需要更新CMake版本

@liyongzheng666
Copy link

这个问题,老哥你解决了嘛

@shinlw
Copy link
Author

shinlw commented Jun 8, 2022

这个问题,老哥你解决了嘛

我列出的修改就是解决这个问题的,若要尝试安装可以用这个
https://github.com/shinlw/vimplus/raw/master/install.sh
替换原本的install.sh后再执行./install.sh

@nianfouyi
Copy link

我一直都手动安装这个!

@nianfouyi
Copy link

这个项目是没有人维护吗

@SkybowAlexandra
Copy link

ubuntu22.04 ,先安装python3-dev ,在安装这个版本不会出现ycmd server shut down

@TCoherence
Copy link

我刚刚简单看了一下YCM的plugin,还是用原本的比较好,这个repo里面用的是另外一个YMC,没有及时和master保持更新,目前的rust版本还停留在2019导致我M1根本弄不上,弄了好久发现是hardcode问题,然后去原repo下面留言结果被作者指出来是branch有问题。。。。
所以最好还是用原repo,这种fork branch然后没有和master保持同步真的。。。有点难顶。。。

@TCoherence
Copy link

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

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

YouCompleteMe github repo: https://github.com/ycm-core/YouCompleteMe

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

Successfully merging this pull request may close these issues.

None yet

5 participants