-
Notifications
You must be signed in to change notification settings - Fork 324
dart.lineLength setting only works at the workspace level when using LSP #3124
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
Comments
Can you confirm the version of Flutter you're using? My guess is that after upgrading, you accepted the prompt to enable the LSP protocol, so it's a result of that rather than the version. |
Result of
Also you are correct, I did opt in to the LSP protocol. Setting |
I switched to Flutter stable (1.22.6) and tested this, but it seems to be honouring the LSP is going to become the default in the future, so I'd like to track down why it's not working for some - could you try the following for me to get a log?
var a = [
123456789,
123456789,
123456789,
123456789,
123456789,
123456789,
123456789,
123456789,
123456789,
123456789,
123456789
]; Thanks! |
@DanTup You're right, strictly following your steps to reproduce I am unable to reproduce the problem. My normal workflow includes creating workspaces with multiple folders in them. So after "Create a new file with just the simple contents below" but before "Run the Dart: Capture Analysis Server Logs command in VS Code" I clicked File > Add Folder to Workspace... and selected another folder to add. At that point I am able to reproduce the problem. Here's the requested log: |
/in the attached log, the settings include: "lineLength":80, Where are you changing the |
In my current workflow the setting is set at the folder It's weird that you'd be showing It also doesn't make sense to me to require the setting to be set at the workspace level, because a workspace exists at a higher level than the project's Git repository, and developers may be working on a different combination of repositories at any given time. (Hence it would not make sense to commit the workspace anywhere.) |
Ah, I think I understand. In the non-LSP version I think we support this as a "resource setting" which means it can be scoped per workspace folder (so if your workspace if you had two projects, they could each have their own setting). There are actually many settings flagged as resource that do not make much sense as such (for example the analyzer log file, which can only exist one per workspace). The LSP server only supports workspace config, which means it'll only work set at the workspace level or the user settings level. |
Fixes Dart-Code/Dart-Code#3124. Change-Id: I724395550ffca14c4cedae46519d568fd0680e02 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/207663 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
dart-lang/sdk@c881935 has landed in the SDK, and Since the change is in the SDK, it will require an SDK update (so may take a little longer to show up than things that only need changes in the VS Code extension). |
Uh oh!
There was an error while loading. Please reload this page.
Updated today and noticed this (apparent) regression. I have
dart.lineLength
set in my project's settings.json file, but Format Document appears to be ignoring this, forcing lines to 80 columns.Edit: Please let me know what other information I can provide as far as troubleshooting goes. :)
The text was updated successfully, but these errors were encountered: