Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Provide CompletionItem.kind for Racer completions#237

Merged
nrc merged 2 commits intorust-lang:masterfrom
Xanewok:fill-completion-item-kind-from-racer
Apr 2, 2017
Merged

Provide CompletionItem.kind for Racer completions#237
nrc merged 2 commits intorust-lang:masterfrom
Xanewok:fill-completion-item-kind-from-racer

Conversation

@Xanewok
Copy link
Copy Markdown
Contributor

@Xanewok Xanewok commented Apr 1, 2017

This implements #74 (Provide CompletionItem.kind from Language Server Protocol).

Right now we have a generic wrench icon applied to every completion:
no-completion-item-kind

After mapping from MatchType in Match from Racer completion results to an appropriate CompleteItemKind we get:
completion-item-kind

Not sure if the mapping is implemented in the right place - I only got inspired by already existing mapping function source_kind_from_def_kind in lsp_data.rs. This is obviously just an idea how we could do that.
We could even introduce mapping for CompletionItemKind::Constructor later on, for example for functions that return an owned version of Self, when we'll be able to retrieve a proper function signature. Until then we could possibly provide heuristics for functions called new or from if needed.

@nrc nrc merged commit dbb677d into rust-lang:master Apr 2, 2017
@nrc
Copy link
Copy Markdown
Member

nrc commented Apr 2, 2017

Thank you!

@Xanewok Xanewok deleted the fill-completion-item-kind-from-racer branch April 2, 2017 20:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants