Reputation: 1
Why I don't get any complete suggestions for mathematical constants from YCM?
For example:
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
cout<<"PI:"<<M_PI<<endl;
return 0;
}
After typing "M_P " in Code::Blocks I get a completion menu with entries "M_PI, M_PI_2, M_PI_4". So I can choose which one I want to use.
Why don't I have the same complete suggestions with YCM? Can YCM do the same?
(code completion for objects works very well.
string str="my string";
str.
YCM gives me here a list of all class methods for this object. Like expected)
EDIT:
OK, a few pictures. Maybe it would help (the problem is simple, probably it wasn't explained correctly)
Picture 1: https://ibb.co/f9Xccsy
At this picture you can see that's YCM works.
Picture 2: https://ibb.co/sJJTCjF
Here I'm using Code::Blocks as my IDE. As you see it has code-complete-function for mathematical constants.
Picture 3: https://ibb.co/B3w2BGY
The same program as above (picture 2). But YCM doesn't give me a completion menu (like Code::Blocks does).
Do you have the same "problem" with YCM or can it be changed?
Thank you!
Upvotes: 0
Views: 95
Reputation: 1
1) Add '-std=gnu11'-flag to your ".ycm_extra_conf.py"-file.
2) Force completion with <Control> + <Space>
Upvotes: 0