mshr-h / vscode-systemverilog-support

[deprecated]use mshr-h/vscode-verilog-hdl-support
https://github.com/mshr-h/vscode-verilog-hdl-support
MIT License
22 stars 14 forks source link

Autoindent support #22

Open skazarynau opened 7 years ago

skazarynau commented 7 years ago

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

mshr-h commented 7 years ago

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

Yushiao commented 7 years ago

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

skazarynau commented 7 years ago

@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

Yushiao commented 7 years ago

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

bjaminn commented 7 years ago

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 );