-
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
omnifunc not respecting findstart when word break present #1322
Comments
Could be going down the wrong path here, but I think what I need is in the FILETYPE_TO_IDENTIFIER_REGEX -- if I could specify a custom matcher here things would be wonderful. Also just a quick note - I tried adding ':' to the semantic completion triggers, but the cursor moved trigger seems to take priority in this scenario. |
I just did a simple test and all works as I expect but I don't know If I understand you correctly, so see CONTRIBUTING.md and post a reproducible example with the output and the expected behaviour. Closing till then. |
Made a simple test case that demonstrates the problem:
ftdetect/test.vim
Just a note - I added ':' here because without it the list becomes empty
My expectation would be that the completion would align to the column returned by the omnifunc |
Ok now I understand what you are talking about.
First let me tell you that this was the wrong path. The Having said that, I can reproduce this obviously because you were right in the title of the issue: YCM do not care for the actual result of the call to the Anyway I think that you could use the basic identifier-based engine since having a |
Any chance we can reopen this. This is likely an issue for all custom file types that use omnifuncs that don't adhere to the same word break rules that are being followed in YCM -- to workaround it, I would need to offer a compatibility setting for YCM that breaks the "word" string on semicolons. |
If you want to hear from @Valloric I can reopen this. |
[READY] Reset the start column in omnifunc completer # PR Prelude Thank you for working on YCM! :) **Please complete these steps and check these boxes (by putting an `x` inside the brackets) _before_ filing your PR:** - [X] I have read and understood YCM's [CONTRIBUTING][cont] document. - [X] I have read and understood YCM's [CODE_OF_CONDUCT][code] document. - [X] I have included tests for the changes in my PR. If not, I have included a rationale for why I haven't. - [X] **I understand my PR may be closed if it becomes obvious I didn't actually perform all of these steps.** # Why this change is necessary and useful A number of issues have been raised over the years where YCM doesn't interact great with the user's omnifunc. This is commonly because we ignore the omnifunc's `findstart` response, and use our own implementation (`base.CompletionStartColumn`). In combination with ycm-core/ycmd#681 this change uses the omnifunc's start column for completions and fixes ycm-core/ycmd#671 and others, such as: - #1322 probably (not yet tested) - #1957 - #1816 Note: This is just an initial test for sharing the code to gauge reaction. Not fully tested yet. [cont]: https://github.com/Valloric/YouCompleteMe/blob/master/CONTRIBUTING.md [code]: https://github.com/Valloric/YouCompleteMe/blob/master/CODE_OF_CONDUCT.md <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/2489) <!-- Reviewable:end -->
Fixed by PR #2489. |
@blayz3r Which plugin is providing the omnifunc? |
@micbou Sorry it's https://github.com/jalvesaq/Nvim-R |
@micbou Thanks will test after it is merged. |
@blayz3r Can you confirm both issues are fixed? |
Hi @micbou, I tested it and it works now!!! Thank you! |
Hi and thank you for this wonderful plugin.
I have run into an issue where the completion returned from an omnifunc is not respecting the findstart value (only occuring when omnicomplete is triggered when the cursor has moved)
My target for this completion is a variation of html and that follows a special pattern that requires the colon as part of the tag. Example below. I don't want to separate the before and after parts of the colon because it would be more efficient (typing wise) not to.
my findstart returns 0, however if I type
<prefix:
from the above, the completion menu aligns itself at the colon. If I manually trigger the omnifunc (C-X C-O) everything works as expected. If I override the the function below so that 0 is returned as the findstart , everything works as expected :The text was updated successfully, but these errors were encountered: