Code Monkey home page Code Monkey logo

Comments (17)

cranehuang avatar cranehuang commented on May 23, 2024 1

flycheck报'iostream' file not found的问题(也即flycheck对C++11的支持问题),可以在.ycm_extra_conf.py文件中加入-std=c++11 的flag,或者在spacemacs的user-config中加入如下代码:
(add-hook 'c++-mode-hook (lambda () (setq flycheck-clang-language-standard "c++11")))

更多信息可以看SO:http://stackoverflow.com/questions/30949847/configuring-flycheck-to-work-with-c11
以及ycm的一个issue:ycm-core/YouCompleteMe#303

from spacemacs-rocks.

scloudyy avatar scloudyy commented on May 23, 2024

请问用ycmd-goto(SPC-g-g)调到一处定义后如何跳回原处呢?就像Gtags用M-.和M-,来回跳一样

from spacemacs-rocks.

zilongshanren avatar zilongshanren commented on May 23, 2024

@scloudyy
用的 evil-jumper 里面的 c-o跳回来的。

from spacemacs-rocks.

scloudyy avatar scloudyy commented on May 23, 2024

谢谢~~还有一个问题就是ycmd分析是不是只分析当前buffer?比如我包含了#include "head.h",但没有进到head.h那个文件里去,那里的内容就补全不了?至少我用ycmd-parse-buffer这个命令他只是分析当前buffer并没有递归的分析下去。

from spacemacs-rocks.

zilongshanren avatar zilongshanren commented on May 23, 2024

@scloudyy
不是只分析当前 buffer,它通过 include 路径做的分析进行补全。

from spacemacs-rocks.

scloudyy avatar scloudyy commented on May 23, 2024

是这样啊~也就是include里的文件用ycmd-parse-buffer它都会去分析?当前文件夹里的.ycm_extra_conf.py优先级是最高的吧,会覆盖spacemacs设置的global_config?

from spacemacs-rocks.

zilongshanren avatar zilongshanren commented on May 23, 2024

@scloudyy
对,当前文件夹的.ycm_extra_conf.py会覆盖全局的。

from spacemacs-rocks.

yuaren avatar yuaren commented on May 23, 2024

请问下,当前目录下已有由YCM-Generator生成的config.py文件,打开该目录下的.C 文件不出现补齐,但是打开一个从github clone的工程时,该工程里面也已包含有config.py文件,自动补齐正常,大概是什么
原因?

找到原因了, 在.spacemacs user-init 中添加(add-hook 'c-mode-hook 'ycmd-mode)就可以了。我以为C++mode下支持.c的补齐

from spacemacs-rocks.

lwj0012 avatar lwj0012 commented on May 23, 2024

ycmd-goto-implementation不能使用吗?Messages里面提示:
REQUEST [error] Error (error) while connecting to http://127.0.0.1:34059/run_completer_command
Supported commands are:
ClearCompilationFlagCache
FixIt
GetDoc
GetDocQuick
GetParent
GetType
GoTo
GoToDeclaration
GoToDefinition
GoToImprecise
GoToInclude
See the docs for information on what they do.
难道是编译ycmd的时候有问题?

from spacemacs-rocks.

 avatar commented on May 23, 2024

我用YCM-Generator在我的项目目录下面也生成了.ycm_extra_conf.py,
可是打开文件出现下面的错误:
REQUEST [error] Error (error) while connecting to http://127.0.0.1:57039/event_notification.
而且每次打开.c或者.h文件的时候都会提示我要不要加载.ycm_extra_conf.py,这个能改成自动加载吗?

from spacemacs-rocks.

jiegec avatar jiegec commented on May 23, 2024

@vinurs 提交问题最好在 emacs-china.org 提问。这个我暂时回答不了,等其它人吧。

from spacemacs-rocks.

zilongshanren avatar zilongshanren commented on May 23, 2024

@vinurs 试试 (set-variable 'ycmd-server-command '("python" "/path/to/ycmd/package")) 这些 ycmd 的问题直接去官方仓库提问会比较好

from spacemacs-rocks.

 avatar commented on May 23, 2024

ok,我明白了

from spacemacs-rocks.

cranehuang avatar cranehuang commented on May 23, 2024

qq 20160929203624
你好,我用的你的配置,然后自己配置了ycmd。flycheck报'iostream' file not found。 但是我用make可以正常构建项目,并成功运行。 我用的clang-3.8 , flycheck-20160912.814, emacs 25.1。

from spacemacs-rocks.

0xtonyxia avatar 0xtonyxia commented on May 23, 2024

您好,请问我用了您的spacemacs-private 配置,ycmd不是默认启用吗,我这里, g g不是ycmd-goto呢?

2017-01-18 18 17 31

而且我spc spc也搜不到ycmd相关的函数

from spacemacs-rocks.

zilongshanren avatar zilongshanren commented on May 23, 2024

@0xtonyxia

我的最新配置已经把 ycmd 删除了。

from spacemacs-rocks.

0xtonyxia avatar 0xtonyxia commented on May 23, 2024

@zilongshanren 那您现在写c/c++的自动补全策略是?

from spacemacs-rocks.

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.