Giter Site home page Giter Site logo

Comments (19)

liuchengxu avatar liuchengxu commented on August 25, 2024

可以贴下你的 .spacevim ( Layers() 应该就够了 ) 和介绍下使用环境(os 之类的)吗?

你是第一次使用 ycmd 吗?如果是的话,可能由于 YouCompleteMe 过于庞大,自动安装并未成功, 这时需要手动安装:

  1. 安装好 cmake
  2. 进入 YouCompleteMe 目录, 确认 submodule 是否完备。
    cd ~/.vim/plugged/YouCompleteMe
    git submodule update --init --recursive
  3. 运行 YouCompleteMe 的安装脚本, 安装选项可查看 YouCompleteMe 自行选择。
    ./install.py --clang-completer

安装步骤倒不是很复杂,关键在于网速。首次安装时,它会自动下载 clang, 可能有几百兆,耐心等待...,以后就不用了。

from space-vim.

YingJie-Zhao avatar YingJie-Zhao commented on August 25, 2024

安装的时候速度基本上都是2、3MB\S,所以我的安装过程应该是没有问题,在:PlugStatus里面也显示YouCompleteMe是已经加载了的,另外我的.spacevim文件是除了默认的内容之外,就只是添加了一句Plug 'ycmd'
我用的系统是运行在Docker中的ubuntu16.04,开始我还以为是ycmd的配置问题,后来找了一下好像跟ycmd的配置没什么关系,请问您有什么好的解决办法吗?

from space-vim.

liuchengxu avatar liuchengxu commented on August 25, 2024

如果确认 YouCompleteMe 安装没有问题的话,那么按照常理应该是可以起作用的。ubuntu 我之前也试过,YouCompleteMe 按照步骤安装应该是没有问题的。不过因为我没有在 docker 中试过,所以可能不是太清楚具体是什么原因。(Plug 'ycmd' -> Layer 'ycmd'

没有自动补全,那它有报任何其他问题吗?:YcmDebugInfo 看是否有什么线索。

你试一下其他 Layer 可以正常工作吗?比如在 .spacevim 中添加 syntax-checking Layer, 打开一个 python 文件,如果有 warning 或 error, 应该就会有所显示了。

function! Layers()
      Layer 'ycmd'
      Layer 'syntax-checking'
endfunction

from space-vim.

YingJie-Zhao avatar YingJie-Zhao commented on August 25, 2024

syntax-checking也是报错,找不到function()....之类的,请问一下这两个插件都是需要在python2.7的环境下才能用吗,因为我的ubuntu16.04只装了python3.5,不知道是不是这里的原因?

from space-vim.

liuchengxu avatar liuchengxu commented on August 25, 2024

我本地也是 python3.5, 应该没问题的。

把完整的错误信息贴一下吧。

from space-vim.

YingJie-Zhao avatar YingJie-Zhao commented on August 25, 2024

请问有什么输出错误日志的配置吗?

from space-vim.

liuchengxu avatar liuchengxu commented on August 25, 2024

额.., 你可以把 vim 的出错信息复制粘贴吗?比如上面的 function ()..., 具体显示的是 function() ... 什么?
没有什么自动化输出错误日志的配置...

from space-vim.

YingJie-Zhao avatar YingJie-Zhao commented on August 25, 2024

我重新开了一个容器,正在安装,稍后会将错误信息和配置贴出来。请稍等。😉

from space-vim.

liuchengxu avatar liuchengxu commented on August 25, 2024

好的,因为我没玩过 docker, 所以也不太了解~

from space-vim.

YingJie-Zhao avatar YingJie-Zhao commented on August 25, 2024

你好,这是我测试的结果:
2017-01-23 6 21 45
2017-01-23 6 23 45
2017-01-23 6 25 33
2017-01-23 6 26 22
2017-01-23 6 29 00
2017-01-23 6 29 14

from space-vim.

YingJie-Zhao avatar YingJie-Zhao commented on August 25, 2024

你好,上面图片里面我贴出来了所安装的layer,以及import的时候并没有开始自动补全的情况,另外几张是我测试:PlugStatus之后,尝试load这些插件的时候的报错信息。

2017-01-23 6 34 37这个是我安装了python2.7之后的错误信息

from space-vim.

liuchengxu avatar liuchengxu commented on August 25, 2024
  1. 看起来像是 YouCompleteMe 的 python 路径不太对,which python 看看你的 python 路径,然后修改下面的内容,将下面的配置信息写到 UserConfig():

    let g:ycm_path_to_python_interpreter='你的 python 路径'
  2. 最后一幅图中的错误信息是由插件 'haya14busa/vim-operator-flashy' 引起的,可以暂时禁用, 在 Layers() 中添加:

    function! Layers()
        Exclude 'kana/vim-operator-user'
        Exclude 'haya14busa/vim-operator-flashy'
    endfunction

from space-vim.

YingJie-Zhao avatar YingJie-Zhao commented on August 25, 2024

let g:ycm_path_to_python_interpreter='/usr/bin/python3'添加到UserConfig()之后,出现了这个错误
2017-01-23 6 34 37

from space-vim.

liuchengxu avatar liuchengxu commented on August 25, 2024

这个就是我之前所说的了,YouCompleteMe 并没安装成功,你需要编译 YouCompleteMe, 按照我开头的步骤做就 OK 了, 三步走~。

from space-vim.

YingJie-Zhao avatar YingJie-Zhao commented on August 25, 2024

...我使用这条命令sh -c "$(curl -fsSL https://raw.githubusercontent.com/liuchengxu/space-vim/master/install.sh)"不是全自动安装编译的吗?😅

from space-vim.

liuchengxu avatar liuchengxu commented on August 25, 2024

是这样,YouCompleMe 有点特殊....., 不过物有所值麽 😆

from space-vim.

liuchengxu avatar liuchengxu commented on August 25, 2024

你好像没有开启 set termguicolors, 可以开启试一下,说不定会有不一样的体验~

关于 ycmd 的使用,YouComplemteMe 可能是 vim 插件中最复杂的一个了,或许应该有个额外的安装说明,提供一个简易的安装脚本~

关于 'haya14busa/vim-operator-flashy' 这个插件,不太清楚为什么在你那里报错,或许可以考虑给它提个 issue.

from space-vim.

YingJie-Zhao avatar YingJie-Zhao commented on August 25, 2024

好的,谢谢您的解答🤝

from space-vim.

liuchengxu avatar liuchengxu commented on August 25, 2024

问题解决了吗?那么就先关闭咯~

from space-vim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.