Closed octref closed 3 years ago
@octref i added a defaultSassFormatterConfig object.
you can probably just delete everything from line 44 to line 58 and replace it with
if (this.config.vetur.format.defaultFormatter.sass === 'sass-formatter') {
return [TextEdit.replace(range, SassFormatter.Format(document.getText(range), {...formattingOptions, ...this.config.sass.format}))];
}
the formatter will make sure that the options are valid i added that a while ago, now you don't need to pass all the options just the ones you want to change.
i can create a pr if you want to, let me know what you want to do.
LGTM, thanks 👍
Hi @TheRealSyler, thanks a lot for your work. I see recently you added CRLF support. When I upgraded, I needed to manually add the
lineEnding
confing to avoid compile error.What do you think about exposing either an object
defaultSassFormatterConfig
of typeSassFormatterConfig
, or a functiongetDefaultSassFormatterConfig
that returnsSassFormatterConfig
? Currently the defaults are in the comments and not accessible through API.Thanks again for your amazing work 👍