richjyoung / vscode-modern-vhdl

Modern VSCode VHDL Support
MIT License
30 stars 12 forks source link
vhdl vhdl08 vhdl93 vscode vscode-language

VSCode Modern VHDL Support

Marketplace Version Marketplace Downloads Marketplace Installs Build Status License

This extension add language support for VHDL, based on the 2008 standard. Also includes syntax highlighting of constants, types and functions for the following standard packages:

The core grammar definition has been written in YAML, to allow easier maintenance and contributions. It has been designed to be as permissive as possible, whilst enforcing syntactically correct design units and control statements.

Features

Coming Soon

Stutter Mode

This feature provides shortcuts to cumbersome syntax elements via multiple presses of certain keys. This optional feature is disabled by default, and can be turned on for Operators, Brackets and Comments as per the following subsections. In order for this to work, you must also set "editor.formatOnType": true to enable live replacement of text as you type.

Both delimiter and bracket shortcut groups only apply outside of comments.

Delimiter Shortcuts

Enable via "vhdl.enableStutterDelimiters": true.

Shortcut Replacement
'' "
;; :
;;; :=
.. =>
,, <=

For all operator replacements (i.e. except "), spaces will be added either side of the replacement if not already present.

Bracket Shortcuts

Enable via "vhdl.enableStutterBrackets": true. Note: These replacements are compatible with "editor.autoClosingBrackets": true, so long as the corresponding close bracket shortcut is also used as this will overwrite the incorrect suggestion.

Shortcut Replacement
[ (
[[ [
] )
]] ]

Comment Shortcuts

Enable via "vhdl.enableStutterComments": true.

Shortcut Replacement
--- Line separator, defined by "vhdl.stutterCommentWidth"
---- Display comment (surrounded by line separators)

Note: An enter keypress at the end of a line that contains a non-empty comment will continue the comment on the next line. This can be cancelled by pressing enter again.

Contributing

Contributions are welcome via issues or pull requests. Bug reports should include a minimal example to reproduce the behaviour. For bugs in the grammar syntax, please also include the output from VSCode Developer: Inspect TM Scopes command.

Any contribution must give copyright to the owner of this repository, Rich J. Young, so that the project can be managed freely. Copyright headers are included in each source code file and these are expected to be unmodified. Any new files must include a similar header.

Major changes are worth discussing by creating an issue first, so that suitability can be agreed in advance of any development effort.

Release Notes

This is extension is under active development, and changes in each release are documented in the CHANGELOG


Copyright (c) 2019 Rich J. Young