codemirror-lang-verilog

1.1.2 • Public • Published

Verilog support for CodeMirror 6

This 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.

Installation

npm install --save codemirror-lang-verilog

Running the demo

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 .

Getting started

Include the language support object as a part of your CodeMirror configuration:

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)
        }),
        /** ... **/
    ]
})

Features

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 declarations
    • Common always constructs
    • parameter declarations
    • begin/end blocks

Known problems

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.

Package Sidebar

Install

npm i codemirror-lang-verilog

Weekly Downloads

2

Version

1.1.2

License

ISC

Unpacked Size

195 kB

Total Files

19

Last publish

Collaborators

  • rantvm