-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
The g:ycm_semantic_triggers doesn't work #1228
Comments
Can you provide a minimal vimrc and the steps for reproducing the bug? Please see CONTRIBUTING.md. Closing until more info are provided. |
For future reference:
|
Match triggers until user's caret column solely. Trying to match triggers with characters after user's caret column doesn't seem to have any utility.
Note that since ycm-core/ycmd#319, look-ahead as suggested in my previous comment is not needed anymore. It can now simply be: My personal line for python is: |
@reinhrst I'm glad that it works easier now but if I can ask: do you really find it necessary to invoke semantic completion after 3 identifiers characters? I mean in that context I usually find the identifier completer good enough; also how's the performance (compared to the size of the project of course)? |
I switched off the identifier completer completely. I found it very confusing that it would suggest names that were not in scope; it meant that I needed to type many more characters to uniquely produce the variable name I need. In addition identifier completer wouldn't complete global python variables (e.g. Edit: the above example directly showing my problem; it's actually |
@reinhrst thanks for the feedback. Assuming the setup you've got wouldn't work, do you think that a ranking of the identifier based on the distance from the cursor would help you with the "scope" problem? |
Quite honestly, it's been some months since I stopped using identifier completer, so I can't quite remember in which situations what happened, but I would say that if you're going to sort them on anything, then distance to cursor makes most sense (or perhaps recently used, by which I mean distance from the cursor when only looking up, not down, in the code). Including all python globals in the identifier completer would also be a step in the right direction (or possibly allow for a configuration setting for identifiers to include). However I would argue that you can never beat a semantic completer, so in case that is too slow, I could imagine that time is better spent on optimising that. |
Well that would be really language specific so I see it as a step in the wrong direction.
I could argue, but is really a personal preference: I don't need semantic all the time and the identifier completion is enough for most of my time (at work I don't even set up the semantic completion atm) and I prefer spending my cpu to something useful in each moment.
Well optimising the semantic engine is not really in our hands here 😝 Anyway thanks for the feedback and thoughts! |
I wrote this in vimrc:
let g:ycm_semantic_triggers = { 'd': ['.', 're![a-zA-Z]'] }
But in d buffers, semantic completion box shows just when I type '.'.Why the semantic completion box doesn't show when I type any character from a to z?
The text was updated successfully, but these errors were encountered: