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

Show more details in type completion items #1975

Merged

Conversation

awerment
Copy link
Contributor

@awerment awerment commented Jun 12, 2023

Follow-up to #1974

This PR adds more details to type completion items

  • full type signature
  • type spec
  • on insert: include parentheses (and place caret inside if type has arguments)

- full type signature
- type spec
- insert with parantheses and var names
@github-actions
Copy link

github-actions bot commented Jun 12, 2023

Uffizzi Preview deployment-28271 was deleted.

@awerment
Copy link
Contributor Author

There's something I'm not entirely sure about inserting types that have variables. Current solution is to insert them as they are defined. This of course means that sometimes the referenced variables' type names will not be known in the current context and cause errors. Another option would be to not include the variables, just place the cursor within the parenthesis - but this will most likely cause issues as well. 🤷‍♂️

@jonatanklosko
Copy link
Member

This of course means that sometimes the referenced variables' type names will not be known in the current context and cause errors

Those are type arguments and we always want to specify a concrete type, no? So cursor in parentheses would be ideal for arity > 0.

Copy link
Member

@jonatanklosko jonatanklosko left a comment

Choose a reason for hiding this comment

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

Perfect, thanks!

@jonatanklosko jonatanklosko merged commit b4e4c64 into livebook-dev:main Jun 12, 2023
6 checks passed
@awerment awerment deleted the feature/completions-type-details branch June 12, 2023 21:09
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.

None yet

2 participants