让 emacs cedet 语义查找包含目录
Cedet 是一个不错的工具套件,但在默认配置下,它很难找到包含的文件。
我想让它在每个父目录中查找名为 include/ 的目录并从那里获取文件。
例如,文件 /home/fakedrake/my-project/some-thing/something-else/file.c
具有 #include "file.h"
file.h 位于 some-thing/file.h 中,但 cedet 无法找到它
如果让 cedet 查找 file.h 以在目录中创建补全,那就太棒了
/home/fakedrake/my-project/some-thing/include/
/home/fakedrake/my-project/include/
(如果它试图查找,我可以接受它)
/include/
/home/include/
/home/fakedrake/include/
)
Cedet is a nice tool suite but in default configuration it has some difficulty locating included files.
I would like to make it look for a directory called include/ in each parent directory and get the file from there.
for examplme a file /home/fakedrake/my-project/some-thing/something-else/file.c
has #include "file.h"
file.h is in some-thing/file.h but cedet fails to locate it
What would be awesome would be to make cedet look for file.h to create completions in directories
/home/fakedrake/my-project/some-thing/include/
/home/fakedrake/my-project/include/
( and i could live with it if it tried to look for
/include/
/home/include/
/home/fakedrake/include/
)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用 EDE 来实现。此外,它允许您为特定项目指定不同的包含路径。 EDE 是 Cedet 的一部分,因此您无需安装任何东西。
基本设置是:
然后对于每个项目,您应该有类似的内容:
这并不完全是您所要求的,因为您仍然必须列出所有包含目录。但通常每个项目只需要完成一次,不需要太多的努力,所以我希望它有所帮助。
Alex Ott 撰写的关于 Cedet 的文章是一个很好的来源如果您需要更多想法。
You can use EDE for it. Moreover, it allows you to specify different include paths for particular projects. EDE is a part of Cedet, so you needn't install anything.
The basic setup is:
Then for each project you should have something like that:
It's not exactly what you're asking for since you still have to list all the include directories. But usually it's done only one time per project and doesn't require too much effort, so I hope it helps.
An article on Cedet by Alex Ott is a pretty good source of ideas if you need more.