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

gitcommit triggers #1957

Closed
coachshea opened this issue Feb 4, 2016 · 5 comments
Closed

gitcommit triggers #1957

coachshea opened this issue Feb 4, 2016 · 5 comments

Comments

@coachshea
Copy link

After install vim-rhubarb by Tim Pope, I was able to get completion of issues and collaborators in gitcommit files by pressing either <c-x><c-o> or <c-space>. I decided to try to trigger this automatically. I removed gitcommit from the disable list and add 'gitcommit': ['@', '#'], to my list of semantic triggers. While this does trigger completion, I get a different list with the trigger than I do if I manually type or after typing a '#' or '@'. Even with the completions already showing (the wrong completions) I can get to the correct completions by typing or . I'll be happy to give move specifics about the completions if it will help, but is there any reason that these two completion lists should be any different at all. As I understand it (my apologies if I'm wrong), but defining a trigger is simply supposed to bring up the same list as without having to type it. Any help is greatly appreciated.

@micbou
Copy link
Collaborator

micbou commented Feb 4, 2016

by pressing either or .

By pressing what and what?

@coachshea
Copy link
Author

Sorry, I didn't escape that properly and it was removed without me noticing. Let me try again, by pressing either ctrl-x/ctrl-o or ctrl-space.

@puremourning
Copy link
Member

Could be related to the javacomplete-related issue with @

IIRC there is some strange interaction with the omnicomplete system which differs when you use forced triggering.

@micbou
Copy link
Collaborator

micbou commented Feb 4, 2016

Yes, I think this is the same issue as #1322 and #1816.

@coachshea
Copy link
Author

Thank you. That explains it.

For now, I've decided to use a workaround.

au FileType gitcommit inoremap # #<c-x><c-o>
au FileType gitcommit inoremap @ @<c-x><c-o>

It seems to get the job done.

Thanks again for your help and for the great plugin.

On Thu, Feb 04, 2016 at 12:58:54PM -0800, micbou wrote:

Yes, I think this is the same issue as #1322 and #1816.


Reply to this email directly or view it on GitHub.*

zzbot added a commit that referenced this issue Jul 3, 2017
[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 -->
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 1, 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