Comments (4)
Is there something special I have to do to make 'format on save' work for Dart?
I have VS Code 1.6.0 and Dart Code 0.11.2, and:
"editor.formatOnSave": true,
"files.autoSave": "onWindowChange",
from dart-code.
I haven't tried this out yet, but does it work if you save explicitly? The release notes have this:
Note: To keep cursors and selections stable, we don't format when saving after delay.
but I'm not really sure what the delay they refer to is. If it works when you explicitly save, then I guess it's that. If that still doesn't work, feel free to raise a case about it not playing nice with formatOnSave
and I'll do some investigation.
from dart-code.
Yeah, I found that confusing too. I think it refers to when "file.autoSave" is set to "afterDelay", which isn't what I selected.
It doesn't format when I explicitly save. I tried setting "file.autoSave" to off and it didn't help. (I haven't seen formatting work at all, actually. When should it be working?)
from dart-code.
Alt+Shift+F formats (it's the normal Code shortcut). I expected it'd just get invoked on save now, but haven't had chance to review the 1.6 stuff. It also seems that compiles errors etc will cause forgetting to fail, could it that?
Could you raise a new case with the details of what does/doesn't work and I'll try to take a look this week?
Thanks!
from dart-code.
Related Issues (20)
- VSCODE/Fluter Code completion not working for widget HOT 3
- Make "Open DevTools in Web Browser" a top-level command HOT 4
- Enabling the legacy protocol for Dart 3.3 results in no completions HOT 1
- Renaming a class by its defined name does not work HOT 1
- Cannot adjust keybinding to return focus to editor from PROBLEMS tab HOT 1
- Save file take a long time HOT 1
- Missing contextual information when hovering over extension type declarations HOT 11
- Cannot launch Flutter 3.19.1 debug session (Android 7, Windows). Was working with 3.16.9 just before Flutter upgrade. HOT 4
- Shortcut to fold asserts HOT 5
- Expose APIs for other VS Code extensions to use functionality from the Dart extension HOT 8
- Missed code action HOT 1
- Extension restart error
- Semantic Tokens For Getter-Setters HOT 7
- Incorrect TM Token for Generics HOT 1
- Add a way to copy the DTD uri HOT 2
- build for windows fails with LNK2001: unresolved external symbol HOT 2
- Add More Semantic Tokens HOT 1
- Issue on website (Upstream Issues) - an issue on the list is closed, should be removed. HOT 1
- DTD is sometimes not terminated correctly HOT 4
- Disable shellExecute in safeSpawn() when we know we don't need it
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dart-code.