Skip to content

Conversation

@D4MI4NX
Copy link

@D4MI4NX D4MI4NX commented Jan 18, 2026

This PR updates the long outdated V syntax highlighting and adds some new features. Changes include:

Detection:

  • Add .vsh and .vv filename detection (note: .v is omitted for Verilog)
  • Add shebang header detection for VSH files

Highlighting


detect:
filename: "\\.(vsh|vv)$"
header: "^#!.*env +\\S+ +v +-raw-vsh-tmp-prefix +tmp$"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this could be a bit less specific to support additional/different args to both env and v. Maybe something like "^#!\\S*env( .*)? v " ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you are right. Maybe we can agree on ^#!\\S*\\benv(\\s.*)?\\sv\\b?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That seems reasonable. The v\\b has some potential to cause false positives but they would probably be rare enough. I don't know of any popular tool or language that would use eg. v-something or v=something.

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

Successfully merging this pull request may close these issues.

2 participants