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

Autocompletion: more specific CompletionItemKind #419

Merged
merged 4 commits into from
Nov 28, 2020

Conversation

axelson
Copy link
Member

@axelson axelson commented Nov 27, 2020

Instead of returning module for all types of modules, return "interface" for behaviours and protocols, and "struct" for structs.

Also add the subtype to the label

This is what the completions look like before:
CompletionBefore

This is what they look like after:
CompletionAfter

Instead of returning module for all types of modules, return "interface"
for behaviours and protocols, and "struct" for structs.

Also add the subtype to the label
case subtype do
:behaviour -> :interface
:protocol -> :interface
:struct -> :struct
Copy link
Collaborator

@lukaszsamson lukaszsamson Nov 27, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exception as a struct?
is there sth for mix task?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it makes sense to return exception as a struct. I don't see anything that would map well to mix tasks, so I think it makes sense to leave it as a module.

@lukaszsamson
Copy link
Collaborator

Nice!

@axelson
Copy link
Member Author

axelson commented Nov 28, 2020

Okay, test has been fixed and added a case to handle exceptions as structs 👍

@lukaszsamson lukaszsamson merged commit 6ffa871 into elixir-lsp:master Nov 28, 2020
@axelson axelson deleted the completion-item-kind branch November 28, 2020 18:37
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

Successfully merging this pull request may close these issues.

2 participants