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

Unhighlighted pin after linebreak (\n) #191

Open
ali-rnik opened this issue Mar 13, 2020 · 4 comments
Open

Unhighlighted pin after linebreak (\n) #191

ali-rnik opened this issue Mar 13, 2020 · 4 comments

Comments

@ali-rnik
Copy link

Consider having a module :
alu ALU(.in(), .in1(), .operation(),
.out());
the .out() is not highlighted.
You can also view this picture to get what I mean.

@vhda
Copy link
Owner

vhda commented Mar 22, 2020

Hi @Strongsaxophone,

You stepped on a syntax bug, which I never noticed before because I always separate the port name from the parentheses. The bad news is that my intention was to not highlight port names.
The ports are currently being highlighted using the verilogMethod syntax item that was created to highlight function and task calls in the form object.function(). As a side benefit, I've kept its capability of highlighting any keyword immediately followed by a parentheses, but excluding specifically ports in instances. The idea was to have the module name of the instance highlighted, but keeping everything else "clean".
If this is something you really want to keep I can work on creating a syntax item for that specific purpose. Or you can include it in g:verilog_syntax_custom as a personal setting.

Thanks!

@ali-rnik
Copy link
Author

Hello @vhda,
I will change that for myself with g:verilog_syntax_custom . I think that's a good idea to have pins in another color different from module instances.
Best Regards.

@vhda vhda reopened this Mar 24, 2020
@vhda
Copy link
Owner

vhda commented Mar 24, 2020

I'm open to improvement suggestions, so let's keep this open. Free time is not much lately, but I'll take this into account while fixing the bug you uncovered.
Are you ok with the current highlight, or would you prefer another "color type"?

@ali-rnik
Copy link
Author

ali-rnik commented Mar 24, 2020

To be honest I have no idea how hard it ( I do not know vim scripting) is to change colors of different parts of Verilog code, But as I see there are three kind of pins which is a good idea to have different colors :

  1. parameters ( which is not hard to identify as it is in #() block, )
  2. instance names
  3. instance pins

So it is a good idea that different pins ( 3 types pointed above), has different colors, but I do not know how hard it is to make these changes :) .

vhda added a commit that referenced this issue Jun 12, 2020
* Exclude instance port lists from matching
* Include #( to also highlight module name in instances with parameters

Related with #191
vhda added a commit that referenced this issue Jun 12, 2020
* Exclude instance port lists from matching
* Include #( to also highlight module name in instances with parameters

Related with #191
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants