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

Snippet variants with n-1 placeholders to use after pipe #501

Merged
merged 1 commit into from
Mar 5, 2021

Conversation

LeartS
Copy link
Contributor

@LeartS LeartS commented Feb 28, 2021

This is a simple implementation based on harcoded variants for the most common use-cases: case, unless and if.

I didn't want overcomplicate it by trying to automatically rewrite snippets into a n-1 version, if, case and unless by themselves should cover the vast majority of real uses cases anyway, I think it's quite rare to pipe stuff to def* & friends.

Before:

elixir-ls-before.mp4

After:

elixir-ls-after.mp4

In non-pipe context, the snippets work as before.

This is a simple implementation based on harcoded variants
for the most common use-cases: case, unless and if.
Copy link

@gilacost gilacost left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Member

@axelson axelson left a comment

Choose a reason for hiding this comment

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

Nice change! ❤️

And I agree with avoiding the re-writing of other completions for now.

@axelson axelson merged commit f60af5f into elixir-lsp:master Mar 5, 2021
axelson added a commit to axelson/elixir-ls that referenced this pull request Mar 5, 2021
axelson added a commit that referenced this pull request Mar 28, 2021
* Add changelog test to verify that the changelog is correctly linked

* Update changelog

* Add #497

* Specify that the fuzzy completion is only for functions

* Fix formatting

* update changelog for #505

* Update changelog for #501, #473, and #504

* Update changelog for #507 and vscode #176

* Update changelog for #511

* Update changelog for #492
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.

4 participants