Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iStyle arguments ignored when iStyle.style is not Indent Only #455

Open
hw770 opened this issue Nov 25, 2023 · 0 comments
Open

iStyle arguments ignored when iStyle.style is not Indent Only #455

hw770 opened this issue Nov 25, 2023 · 0 comments
Labels

Comments

@hw770
Copy link

hw770 commented Nov 25, 2023

Describe the bug
Arguments "-s2" that should be passed to iStyle was ignored when I choose "K&R" style.

Environment :

  • Extension version 1.13.0

Steps to reproduce
My iStyle formatter settings:

{
    "verilog.formatting.iStyleVerilogFormatter.style": "K&R",
    "verilog.formatting.iStyleVerilogFormatter.arguments": "-s2"
}

Expected behavior
Format verilog file in K&R style, indent size 2.

Actual behavior
Format result:
The file's indent size is 4. The argument -s2 is ignored.

Additional context
I guess the reason is the two commands below behaves differently:
istyle --style=kr -s2 .\src\DM.v
istyle -s2 --style=kr .\src\DM.v
The formmer result in indentsize=2, the latter 4.
So, changing the settings into

{
    "verilog.formatting.iStyleVerilogFormatter.style": "Indent Only",
    "verilog.formatting.iStyleVerilogFormatter.arguments": " --style=kr -s2"
}

works.

@hw770 hw770 added the bug label Nov 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant