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

Special instance indentation support #102

Open
vhda opened this issue May 18, 2016 · 8 comments
Open

Special instance indentation support #102

vhda opened this issue May 18, 2016 · 8 comments
Assignees

Comments

@vhda
Copy link
Owner

vhda commented May 18, 2016

@Lewis could you check how hard it would be to support the following indentation in instances?

  my_module #(
    .PARAM1 (VALUE1),
    .PARAM2 (VALUE2),
    )
    u_my_instance(
      `ifdef TEST
      .port1 (wire1),
      `endif
      .port2 (wire2)
      );
@vhda vhda added this to the Release 3.1 milestone May 18, 2016
@vhda vhda removed this from the Release 3.1 milestone May 18, 2016
@lewis6991
Copy link
Collaborator

What's the current and what is the desired?

@vhda
Copy link
Owner Author

vhda commented May 18, 2016

That's the desired.
Try copying to Vim and open a new line after the instance, you will see that the indentation will match the offset introduced in the instance.

@lewis6991
Copy link
Collaborator

What config do you have with this?

@lewis6991
Copy link
Collaborator

lewis6991 commented May 18, 2016

I currently get:

my_module #(
  .PARAM1 (VALUE1),
  .PARAM2 (VALUE2)
)
u_my_instance(
  .port1 (wire1),
  .port2 (wire2)
  );

logic a;

@vhda
Copy link
Owner Author

vhda commented May 18, 2016

You need to keep the indentation of the instance exactly as I copied above and only indent after the instance.

@lewis6991
Copy link
Collaborator

lewis6991 commented May 18, 2016

Seems fine for me if I set b:verilog_dont_deindent_eos.

my_module #(
  .PARAM1 (VALUE1),
  .PARAM2 (VALUE2)
  )
  u_my_instance(
    .port1 (wire1),
    .port2 (wire2)
    );

logic a;

@vhda
Copy link
Owner Author

vhda commented May 18, 2016

Ups! Needs an ifdef. I've edited my example above.

Sorry :)

@lewis6991
Copy link
Collaborator

This won't be easy at all. I have a feeling there be may be a bug here around preprocessor statements.

@vhda vhda assigned vhda and unassigned lewis6991 Mar 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants