ThisIsManta / stylus-supremacy

A Node.js script that helps formatting Stylus files.
https://thisismanta.github.io/stylus-supremacy
MIT License
88 stars 9 forks source link

Only run on save? #66

Open inspire22 opened 4 years ago

inspire22 commented 4 years ago

I've got some invalid stylus in my file, but the editor won't let me fix it at all which is super frustrating...

.ml1 margin-left: 1em.ml2 margin-left: 2em, .my0 margin-top 0; margin-bottom 0;

If I try to put a newline after the first "1em" it immediately adds a comma and moves it back up to that line.

Is there any way to run the fixer only on save? Or not run when there's linter errors? I'm having to set the code type to another language to do edits now then put it back to stylus when I'm fairly sure it won't wrestle with me.

ThisIsManta commented 4 years ago

I don't quite fully understand you. Would you mind uploading a GIF/video, please?

rendaoer commented 3 years ago

动画 Trying to start writing code from a new line, but can't do it

ThisIsManta commented 3 years ago

What's your VS Code settings? Did you have some sort of format when type turned on?

rendaoer commented 3 years ago

It's all default settings, I didn't change it. I just want to be able to add new lines to write the code and then format it when saving

KnifeFed commented 2 years ago

When editor.formatOnType is enabled, I can't insert newlines in the file. They're immediately removed.