Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No completions for STL classes (such as string) #305

Closed
kriskalish opened this issue May 9, 2013 · 2 comments
Closed

No completions for STL classes (such as string) #305

kriskalish opened this issue May 9, 2013 · 2 comments

Comments

@kriskalish
Copy link

I'm on Ubuntu 13.04 using a custom-built vim.
I mostly followed the quick install instructions, except I opted to use the system libclang.

If I make a very simple file and use a simple .ym_extra_conf.py that's basically a copy, paste job from the YCM version and make the following file:

//simple.cpp
#include <string>

int main()
{
    std::string mystring;
    mystring.
}

when I type "mystring." I get a "User defined completion (^U^N^P) Pattern not found" message printed to the status line:

Here is the output of :YcmDiags
Forcing compilation, this will block Vim until done.
No warnings or errors detected

Here is the output of :messages
"simple.cpp" 7L, 75C
No completions found; errors in file?

The simple completions seem to work, such as finishing "mystring" for me, but not the meaningful syntactic ones. I'm kind of at a loss as to how to debug this thing further since the output of YcmDiags suggests that the file is being built properly, and thus finding string.h on my system.

Any help is appreciated,
Kris

@Valloric
Copy link
Member

Valloric commented May 9, 2013

Unable to reproduce. I took your test case and used YCM's .ycm_extra_conf.py file and I got semantic completions after mystring. just fine.

You probably made a mistake in your extra conf file.

@Valloric Valloric closed this as completed May 9, 2013
@NoSohoth
Copy link

Had the same problem for a while, I just figured it out : it's indeed a mistake in ycm_extra_conf.py but kind of a tricky one.
The clang completer doesn't currently support c++14, and adding '-std=c++14' to the flag list was the source of the problem.

Solution : Use c++11 or c++1y instead.

bijancn pushed a commit to bijancn/YouCompleteMe that referenced this issue Jul 26, 2016
Extends PreparedTriggers.

Allows one to obtain the current trigger regex from inside semantic
completers, enabling customized completions based on it, like normal
code completion or argument hints.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/valloric/ycmd/305)
<!-- Reviewable:end -->
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants