Verilog language support for CodeMirror 6
npm install codemirror-lang-verilogThis package provides Verilog (IEEE Std 1364-2005) language support for CodeMirror 6. Limited autocompletion features are also available. Note that CodeMirror 6 (and this package by extension) are intended to be used through a browser.
``sh`
npm install --save codemirror-lang-verilog
There is a demo that you can start up with npx esmoduleserve ./demo/. This brings up a website at http://localhost:8080 that allows you to test the .
Include the language support object as a part of your CodeMirror configuration:
`js
import { verilog } from 'codemirror-lang-verilog';
/ ... /
new EditorView({
extensions: [
/ ... /
verilog({
// This object and all of its members are optional.
// Shown values are the defaults
completion: true // Enables the autocompletion features (default)
}),
/ ... /
]
})
`
The package has the following features:
* 99% complete Verilog-2005 grammar
* libraries were omitted (defined in Annex A, 1.1)
* Automatic indentation.
* Autocompletion for:
* Common module declarationsalways
* Common constructsparameter
* declarationsbegin
* /end` blocks
The following are known problems:
* Library files are not supported.
* Autocompletion indicator images are not present for most completions.
* Keyword completion is very limited.
* There is no completion for defined identifiers.