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

Automatically add | when using multiline strings #121

Merged
merged 1 commit into from
Jun 21, 2019

Conversation

tgodzik
Copy link
Contributor

@tgodzik tgodzik commented Jun 19, 2019

I finally got annoyed when adding new tests and came up with a working(?) solution for automatically adding |

This will not break when using | as an operator since we require either only \s before or """| and we can't get just the operator without anything on the left.

working

The only problem I have is when doing enter after """| indentation doesn't go all the way up to where it should. Any ideas? Thoughts?

problem

There are two formatting changes that came up probably because I installed prettifier.

Side note: I learned to make GIFs! Was actually pretty easy :D

@tgodzik tgodzik requested review from olafurpg and gabro June 20, 2019 19:30
Copy link
Member

@gabro gabro left a comment

Choose a reason for hiding this comment

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

I think this is a nice improvement and I propose we merge it as is.
We can work around the first newline issue in a separate PR.

@tgodzik tgodzik merged commit 97a62c1 into scalameta:master Jun 21, 2019
Copy link
Member

@olafurpg olafurpg left a comment

Choose a reason for hiding this comment

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

I absolutely agree that editing multiline strings is a big pain in VS Code. It's one of the things I miss the most from IntelliJ.

I'm am concerned the solution in this PR is quite fragile however:

  • it triggers even when editing outside of string literals
  • it doesn't handle copy-pasted code
  • it only works with VS Code

I'm OK with keeping this change since it does solve the biggest pain point. I opened a followup ticket with more details on how I believe it's possible to solve this problem more robustly via LSP.

kasiaMarek pushed a commit to kasiaMarek/metals-vscode that referenced this pull request Mar 29, 2023
…rn/types/node-14.0.4

Bump @types/node from 14.0.1 to 14.0.4
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

3 participants