marcc
Marc Costa 25 posts
|
#11772
YouCompleteMe - Vim Completion Engine 1 year ago
I found the information in this page: vimcasts.org very useful for some advanced usage scenarions. I haven't read the book, so I can't comment on that.
|
KaanAlpar
3 posts
|
#11773
YouCompleteMe - Vim Completion Engine 1 year ago
It's pretty laggy though if you try to backspace a letter
|
Chen96
Chen 70 posts
1 project
Some guy trying to make some video game. |
#11836
YouCompleteMe - Vim Completion Engine 11 months, 3 weeks ago
YCM is a pretty sweet engine, but how am I going to configure it if I'm doing unity build (the way handmade hero builds)? It seems to me that it treats every .cpp file as a separate compilation unit so it just breaks when I try to do unity build.
I am working on Monter |
mmozeiko
Mārtiņš Možeiko 1638 posts
1 project
|
#11837
YouCompleteMe - Vim Completion Engine 11 months, 3 weeks ago
Don't name them with .cpp extension? Maybe "file.impl.h" or just "file.inl" so it will treat them as headers.
|
timothy.wright
Timothy Wright 77 posts
1 project
|
#11838
YouCompleteMe - Vim Completion Engine 11 months, 3 weeks ago Chen96 I have the same problem developing stb headers. When you are in the header, the #define IMPLEMENTATION isn't defined, so it doesn't parse this code. It's a little janky, but I just make a define like this:
Then I just add a '-DYCM_DEV', to the .ycm_extra_conf.py You can also do this same thing and just add whatever includes you need so ycm will find them but the unity build won't.
It is kinda Janky but I haven't found a better way. |
Chen96
Chen 70 posts
1 project
Some guy trying to make some video game. |
#11842
YouCompleteMe - Vim Completion Engine 11 months, 3 weeks ago Edited by Chen on May 5, 2017, 7:35 p.m. Reason: Needed to put more information
Oh yeah, didn't think about that! That's a pretty hacked way but it should work just fine. However if I include multiple ini files (treated as headers now) in a cpp file, wouldn't ycm ignore the fact that preceding files will be invisible to the later included ini files?
One question post on stackoverflow that's similar: http://stackoverflow.com/question...438211/youcompleteme-header-files In the example that is shown in the post, content that's in a.h is not visible to b.h, but in the cpp file a.h is included before b.h file is included. What's the workaround so that ycm will understand the entire content of a.h should be visible to b.h? I am working on Monter |
mmozeiko
Mārtiņš Možeiko 1638 posts
1 project
|
#11843
YouCompleteMe - Vim Completion Engine 11 months, 3 weeks ago
You should structure the included "cpp" files (.inl or whatever) in a way that they are independent. That means have them #include in the beginning other .h files they depend on.
If you just have .h files without any .cpp and are depending on this implicit dependency then there's nothing you can do... |
Chen96
Chen 70 posts
1 project
Some guy trying to make some video game. |
#11844
YouCompleteMe - Vim Completion Engine 11 months, 3 weeks ago
I see. That was pretty helpful, thanks!
I am working on Monter |