Comments (17)
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.
请问用ycmd-goto(SPC-g-g)调到一处定义后如何跳回原处呢?就像Gtags用M-.和M-,来回跳一样
from spacemacs-rocks.
@scloudyy
用的 evil-jumper 里面的 c-o
跳回来的。
from spacemacs-rocks.
谢谢~~还有一个问题就是ycmd分析是不是只分析当前buffer?比如我包含了#include "head.h",但没有进到head.h那个文件里去,那里的内容就补全不了?至少我用ycmd-parse-buffer这个命令他只是分析当前buffer并没有递归的分析下去。
from spacemacs-rocks.
@scloudyy
不是只分析当前 buffer,它通过 include 路径做的分析进行补全。
from spacemacs-rocks.
是这样啊~也就是include里的文件用ycmd-parse-buffer它都会去分析?当前文件夹里的.ycm_extra_conf.py优先级是最高的吧,会覆盖spacemacs设置的global_config?
from spacemacs-rocks.
@scloudyy
对,当前文件夹的.ycm_extra_conf.py会覆盖全局的。
from spacemacs-rocks.
请问下,当前目录下已有由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.
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.
我用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.
@vinurs 提交问题最好在 emacs-china.org 提问。这个我暂时回答不了,等其它人吧。
from spacemacs-rocks.
@vinurs 试试 (set-variable 'ycmd-server-command '("python" "/path/to/ycmd/package"))
这些 ycmd 的问题直接去官方仓库提问会比较好
from spacemacs-rocks.
ok,我明白了
from spacemacs-rocks.
你好,我用的你的配置,然后自己配置了ycmd。flycheck报'iostream' file not found。 但是我用make可以正常构建项目,并成功运行。 我用的clang-3.8 , flycheck-20160912.814, emacs 25.1。
from spacemacs-rocks.
您好,请问我用了您的spacemacs-private 配置,ycmd不是默认启用吗,我这里, g g
不是ycmd-goto呢?
而且我spc spc
也搜不到ycmd相关的函数
from spacemacs-rocks.
我的最新配置已经把 ycmd 删除了。
from spacemacs-rocks.
@zilongshanren 那您现在写c/c++的自动补全策略是?
from spacemacs-rocks.
Related Issues (20)
- MarkSet的颜色设置 HOT 1
- 第15天的标题错误 HOT 2
- org mode时按C+c a a 出来的日程表和文件不一样 HOT 2
- `dotspacemacs-configuration-layers` 无法设置变量
- emacs批量操作文件夹中文件名矩形选择无法编辑
- require 'org-install is obsolete since emacs 26.1
- When add pkg installed everytime, you have to reboot your emacs.
- emacs的包管理器里面没有company
- show-paren-mode打开Python大文件非常卡顿
- 感谢子龙的视频教程 HOT 4
- evil安装不了 HOT 1
- howdo HOT 1
- 求上传一份视频教程到Bilibili. HOT 2
- 只有16天啊 HOT 1
- travis构建失效了 HOT 1
- 21天学会Emacs 2022高清重制版
- 安装cask(day8) HOT 4
- pallet-install失败(day8)
- Day16 ctags自动补全
- typo in README.org HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spacemacs-rocks.