Closed jcppython closed 4 years ago
semantic
layer, at least SPC m r
should be available to access srefactor
's menu.company-c-headers-path-system
for it to complete. Something like this:(add-to-list 'company-c-headers-path-system "/usr/include/c++/4.8/" )
Because it's is system-specific, we cannot preconfigured it.
flycheck-clang-include-path
.gtags
layer (after adding the layer, some SPC m
key bindings for gtags
should be available. Use the command helm-gtags-create-tags
to generate a tag database at your project root. Then, you will be able to jump to definitions and find references.Sorry, SPC m
is undefined occuring some times. This situation is incidental...
You can see that: I type SPC m g c
to create gtags .. .
You can try to SPC m
when you open a C/C++ file immediately after you start spacemacs.
Where is better place to add the following codes? dotspacemacs/user-config () ?
(add-to-list 'company-c-headers-path-system "/usr/include/c++/4.8/" )
May be we can add a variable to configure it when we enable C-C++ layer?
flycheck-clang-include-path
and company-c-headers-path-system / company-c-headers-usr-system
?
Do I should to add project include paths into company-c-headers-usr-system
?SPC m
is available. I have another question:
Could we can create tha gtags file into another folder? Because the project belong to a big team sometimes. I can't to write files into the root of project at that time.Are your packages updated? How old is your bind-map
package?
elpa/bind-map-20151217.829/..
I think it should be the latest. I install the spacemacs yesterday.
Yeah ok, it's not that then. Can I try your dotfile?
@TheBB dotfile refers to .spacemacs? It only have a little changes in this file. spacemacs.txt
Okay, I tried with your dotfile (except I had to remove the chinese layer), and SPC m
works fine for me in C++ mode.
Yeah, It seems chinese layer leads to this issue. Then, I will have to remove chinese layer? ...
Really? It works without the chinese layer?
Sorry, I try to operate it more times. The problem still exist after I comment chinese layer
.
In addition, I find that SPC m
can work after I have some other operations, for example, gg
and G
.
ps: SPC m
works fine in other major-mode, for example, org-mode.
Can you give more methods to debug it? Or, Do you need some other information?
@jcppython I have the same issues with you. Have you fixed this problems?
@TheBB Hi, I have the same issues that can't find the C++ headers.
Here is the problem that whether I set c-c++-default-mode-for-headers 'c++-mode
or not company-c-headers find header files at /usr/include
, but should be at /usr/include/c++/4.2.1
.What should I set in my .spacemacs
?
@Voleking Do you have clang support enabled? If you do, create a .clang_complete
file in the root of your project. Add the flag -I/usr/include/c++/4.2.1
to the beginning of the .clang_complete
file. Otherwise, try adding (add-to-list 'company-c-headers-path-system "/usr/include/c++/4.2.1") to your .spacemacs
.
May be fixed in develop after https://github.com/syl20bnr/spacemacs/pull/9381 is merged.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!
Here is my configuration
emacs-version GNU Emacs 24.4.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.8)
An unfriendly tip as shown in following:
And, the code is right. In other words, this tip shouldn't exist in here. In addition, how to open a header file? command or key binding?
Thank you~