Skip to content
This repository has been archived by the owner on Jul 17, 2019. It is now read-only.

Suggestion: Change auto indent via vscode user settings #50

Closed
7YZA1owXxM opened this issue Aug 2, 2018 · 1 comment
Closed

Suggestion: Change auto indent via vscode user settings #50

7YZA1owXxM opened this issue Aug 2, 2018 · 1 comment

Comments

@7YZA1owXxM
Copy link

Subj.
Need a setting option to change action in extension.js from { indentAction: vscode.IndentAction.Indent } to {} or whatever. Auto indentations are a bit annoying, imho.

function activate(context) {
    vscode.languages.setLanguageConfiguration("sass", {
        wordPattern: /(#?-?\d*\.\d\w*%?)|([$@#!.:]?[\w-?]+%?)|[$@#!.]/g,
        onEnterRules: [
            {
                beforeText: /^((?!^(\s+|.*: .*|.*@.*|.*,|\s+\+.*)$).*|.*@media(?!^\s+$).*)$/,
                action: { indentAction: vscode.IndentAction.Indent } /* this one */
            }
        ]
    });
    var sassCompletion = new sassAutocomplete_1.default();
    var sassCompletionRegister = vscode.languages.registerCompletionItemProvider([
        { language: "sass", scheme: "file" },
        { language: "sass", scheme: "untitled" },
    ], sassCompletion, "\\.", "@");
    context.subscriptions.push(sassCompletionRegister);
}
@robinbentley
Copy link
Owner

I'll add a disableAutoIndent option for it whilst I'm working on #49

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants