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

Support additionalTextEdits field of CompletionItem #85

Closed
euclio opened this issue Aug 9, 2017 · 5 comments
Closed

Support additionalTextEdits field of CompletionItem #85

euclio opened this issue Aug 9, 2017 · 5 comments

Comments

@euclio
Copy link
Contributor

euclio commented Aug 9, 2017

This is used by the Java language server to supply automatic imports on completion.

It should only edit the document once the completion is actually selected.

@autozimu
Copy link
Owner

Completion is handled by deoplete or NVM. I can definitely make a change in this plugin to pass down additionalTextEdits.

The bigger part of change will need to be done on deoplete or NVM part though.

@euclio
Copy link
Contributor Author

euclio commented Aug 10, 2017

According to the linked deoplete issue, Shougo would rather have the additional edits performed with the CompleteDone autocmd than in deoplete itself.

@DeltaEvo
Copy link
Contributor

DeltaEvo commented Aug 17, 2017

I'm trying to implement this and snippets support by using CompleteDone event, but i have some issues with this.
Like @Shougo said this cause issues with other plugins because I can't assume that the completion came from LanguageClient.
I have some ideas but I don't like them:

  • If plugin is deoplete i can parse from menu attribute
  • Add some recognisable characters in some fields for the completion item

I think the best for this feature is that deoplete and ncm add a global variable containing the source name of the last completion but i don't know if it's possible ( hello @roxma ) ?

@autozimu
Copy link
Owner

autozimu commented Aug 17, 2017 via email

autozimu pushed a commit that referenced this issue Sep 28, 2017
Also pass on additionalTextEdits. See #85.
autozimu pushed a commit that referenced this issue Jan 4, 2018
autozimu pushed a commit that referenced this issue Jan 4, 2018
@autozimu
Copy link
Owner

autozimu commented Jan 4, 2018

This plugin has exposed enough information and function to achieve this feature.

The extra integration work should be done and tracked at completion framework side. e.g., roxma/nvim-completion-manager#130

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants