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

Reenable auto extend imports and drop snippets for infix completions #1266

Merged
merged 12 commits into from
Jan 31, 2021

Conversation

pepeiborra
Copy link
Collaborator

@pepeiborra pepeiborra commented Jan 26, 2021

This builds on the work done by @gdevanla in haskell/ghcide#930 and @berberman in #1246 to reenable completions to automatically extend import lists.

There were two issues that led to this feature getting disabled:

  1. the imports were extended multiple times. This is addressed by using a Command that recomputes the edit on invocation, instead reusing the edit computed at completion time
  2. the imports were extended wrongly. This is addressed by using ghc-exactprint to ensure the extension is always well formed

While I was there, I also took the chance to drop snippets when typing an infix combinator

@pepeiborra pepeiborra force-pushed the completions branch 2 times, most recently from 466ec47 to 3e37ba7 Compare January 27, 2021 09:06
@pepeiborra pepeiborra changed the title Reenable auto extend imports Reenable auto extend imports and drop snippets for infix completions Jan 27, 2021
@pepeiborra pepeiborra requested review from berberman and konn January 30, 2021 11:53
Copy link
Collaborator

@konn konn left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@pepeiborra pepeiborra added the merge me Label to trigger pull request merge label Jan 30, 2021
@pepeiborra pepeiborra force-pushed the completions branch 4 times, most recently from 1085142 to cff2b03 Compare January 31, 2021 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge me Label to trigger pull request merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants