vscode-systemverilog-support icon indicating copy to clipboard operation
vscode-systemverilog-support copied to clipboard

Autoindent support

Open skazarynau opened this issue 8 years ago • 5 comments

Hi, Is autoindent supported. If so, how to turn it on? Thanks, Siarhei

skazarynau avatar Mar 27 '17 13:03 skazarynau

Not supported yet. You can make a Pull Request if you want. Thanks.

mshr-h avatar Mar 28 '17 04:03 mshr-h

I think vscode support autoindent by add brackets pair in language-configuration.json

But it will cause #6, maybe we can wait vscode issue to be fixed

Yushiao avatar Mar 29 '17 08:03 Yushiao

@Yushiao Where is language-configuration.json for this extention? I see many such files in C:\Program Files (x86)\Microsoft VS Code\resources\app\extensions but I cannot find the file for SystemVerilog

skazarynau avatar Mar 29 '17 12:03 skazarynau

@skazarynau If you want to modify language-configuration.json. It is at C:\Users\name\.vscode\extensions\mshr-h.SystemVerilog-0.0.12

Yushiao avatar Mar 29 '17 13:03 Yushiao

It seems the following code might need to be used to supply indenting. I am not sure if this is possible with a language like systemverilog.

    var rules = <vscode.LanguageConfiguration>{};

    rules.indentationRules = {
        increaseIndentPattern: /\bbegin\b/,
        decreaseIndentPattern: /\bend\b/
    };

    vscode.languages.setLanguageConfiguration('systemverilog', rules );

bjaminn avatar Apr 03 '17 01:04 bjaminn