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

Support "format selection" [LSP] #812

Closed
partounian opened this issue Apr 17, 2018 · 4 comments
Closed

Support "format selection" [LSP] #812

partounian opened this issue Apr 17, 2018 · 4 comments
Labels
in editor Relates to code editing or language features in lsp/analysis server Something to be fixed in the Dart analysis server is enhancement
Milestone

Comments

@partounian
Copy link

partounian commented Apr 17, 2018

When I use the vim command =, it throws the error There is no formatter for 'dart'-files installed.

VSCode Version 1.22.2 (1.22.2)
Dart Code Version 2.11.2

@DanTup
Copy link
Member

DanTup commented Apr 18, 2018

I can't find any information on what the vim command = is supposed to do - can you provide more info about this? (I think a VsCodeVim extension, but I can't find any docs suggesting that = is related to formatting).

If you click Format Document in the context menu, does that work? If so, my guesses are:

  1. Something is buggy with the vim extension
  2. It's trying to format a selection, which isn't supported by Dart (requires Support formatting of source selections dart-lang/dart_style#92)

@DanTup DanTup added the awaiting info Requires more information from the customer to progress label Apr 18, 2018
@partounian
Copy link
Author

partounian commented Apr 18, 2018

= if used in vim for formatting though it is required to choose a selection (the selection can be the entire file with gg=G [go to top of file, format until bottom]). Format document does work, so it is safe to assume this is related to dart-lang/dart_style#92 . Safe to assume we can close this then as it's basically a duplicate.

@DanTup DanTup added blocked on dart / flutter Requires a change in Dart or Flutter to progress is enhancement in editor Relates to code editing or language features and removed awaiting info Requires more information from the customer to progress labels Apr 18, 2018
@DanTup DanTup added this to the Backlog milestone Apr 18, 2018
@DanTup DanTup changed the title There is no formatter for 'dart'-files installed. (vim vscodevim plugin) Support "format selection" Apr 18, 2018
@DanTup
Copy link
Member

DanTup commented Apr 18, 2018

Seems like we actually don't have an open issue about this as a reminder, so I'm re-opening this and re-purposing it. If/when the above case is done, we will implement this (and in the meantime, this case can serve as a reminder of something we want to do but are blocked on).

@DanTup DanTup reopened this Apr 18, 2018
@DanTup DanTup added the in lsp/analysis server Something to be fixed in the Dart analysis server label Jun 1, 2020
@DanTup DanTup removed the blocked on dart / flutter Requires a change in Dart or Flutter to progress label Nov 12, 2020
@DanTup DanTup modified the milestones: Backlog, v3.17.0 Nov 12, 2020
@DanTup DanTup changed the title Support "format selection" Support "format selection" [LSP] Nov 12, 2020
dart-bot pushed a commit to dart-lang/sdk that referenced this issue Nov 12, 2020
Fixes Dart-Code/Dart-Code#812.

Change-Id: I099654483f3799344d68640b4d00df88e6bbca01
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171722
Commit-Queue: Danny Tuppeny <danny@tuppeny.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
@DanTup
Copy link
Member

DanTup commented Nov 12, 2020

Fixed by dart-lang/sdk@44e680a.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in editor Relates to code editing or language features in lsp/analysis server Something to be fixed in the Dart analysis server is enhancement
Projects
None yet
Development

No branches or pull requests

2 participants