-
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
[READY] Do not depend on UltiSnips internals to fetch snippets #2321
Conversation
I think that unless we provide an API that allow to add additional identifier like snippets, hence delegating the "when to do it" to the external source, the FAQ is the best way. This way we cover the majority of the cases anyway. Reviewed 3 of 3 files at r1. Comments from Reviewable |
Reviewed 2 of 3 files at r1. python/ycm/youcompleteme.py, line 689 [r1] (raw file):
It's the last bit that I'm surprised by. It says to use the example in question: function! GetAllSnippets()
call UltiSnips#SnippetsInCurrentScope(1)
let list = []
for [key, info] in items(g:current_ulti_dict_info)
... Comments from Reviewable |
Review status: all files reviewed at latest revision, 1 unresolved discussion. python/ycm/youcompleteme.py, line 689 [r1] (raw file):
|
Reviewed 3 of 3 files at r1. python/ycm/youcompleteme.py, line 689 [r1] (raw file):
This function also returns the
This is what the Comments from Reviewable |
Review status: all files reviewed at latest revision, 1 unresolved discussion. python/ycm/youcompleteme.py, line 689 [r1] (raw file):
OK makes sense, but feels a tad like relying on undocumented (and thus unstable) behaviour.
OK sure. Thanks makes sense Comments from Reviewable |
11782b8
to
355f07f
Compare
Review status: 2 of 3 files reviewed at latest revision, 1 unresolved discussion. python/ycm/youcompleteme.py, line 689 [r1] (raw file):
Good point. I've decided to follow the documentation. Comments from Reviewable |
Does the try/except block inform the user in anyway? (I don't know enough about python/vim interaction to know if vim.error is reported regardless. If not, would be a good idea to do a vimsupport.PostVimMessage(). When I was debugging this, it took a while to track down the issue, an error at the status line would have helped. Thanks for the quick fix! |
Printing a message on the status line would be annoying for those that don't use UltiSnips. This is where a logfile would be useful. Reviewed 1 of 1 files at r2. Comments from Reviewable |
Reviewed 1 of 3 files at r1. Comments from Reviewable |
Reviewed 1 of 1 files at r2. Comments from Reviewable |
Review status: all files reviewed at latest revision, 1 unresolved discussion. Comments from Reviewable |
☔ The latest upstream changes (presumably #2324) made this pull request unmergeable. Please resolve the merge conflicts. |
6d1864f
to
882f4ec
Compare
Use UltiSnips#SnippetsInCurrentScope to fetch snippets. Add an entry in the FAQ about the :UltiSnipsAddFiletypes command.
882f4ec
to
5dca552
Compare
PR rebased. A lot of users seem to be affected by this so let's merge the PR. @homu r+ Reviewed 2 of 2 files at r3. Comments from Reviewable |
📌 Commit 5dca552 has been approved by |
⚡ Test exempted - status |
[READY] Do not depend on UltiSnips internals to fetch snippets Use the `UltiSnips#SnippetsInCurrentScope` public function instead of the `UltiSnips_Manager` internal object to fetch snippets. Fixes #2320. Give a workaround in the FAQ for snippets not suggested as candidates if added with the `:UltiSnipsAddFiletypes` command. <!-- 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/2321) <!-- Reviewable:end -->
Use the
UltiSnips#SnippetsInCurrentScope
public function instead of theUltiSnips_Manager
internal object to fetch snippets. Fixes #2320.Give a workaround in the FAQ for snippets not suggested as candidates if added with the
:UltiSnipsAddFiletypes
command.This change is![Reviewable](https://camo.githubusercontent.com/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)