Go to file
2019-12-02 14:06:21 +10:00
images Add marketplace icon 2019-12-02 14:05:47 +10:00
src Improved outline view 2019-11-30 18:56:17 +10:00
syntaxes Before creating a package 2019-11-28 15:37:37 +10:00
.gitignore Ignore .vsix files and out/ folder 2019-12-02 12:30:18 +10:00
CHANGELOG.md Add marketplace icon 2019-12-02 14:05:47 +10:00
demo.in New version with outline view 2019-12-01 19:36:36 +10:00
language-configuration.json Before creating a package 2019-11-28 15:37:37 +10:00
LICENSE Published on github 2019-11-28 16:55:04 +10:00
package.json New version with marketplace icon 2019-12-02 14:06:21 +10:00
README.md Add marketplace icon 2019-12-02 14:05:47 +10:00
tsconfig.json Work in progress on symbol provider 2019-11-29 16:53:01 +10:00
vsc-extension-quickstart.md Created with yo 2019-11-26 23:02:14 +10:00

SWMF Configuration

This is a Visual Studio Code extension and should be installed from the VS Code extensions marketplace

This extension provides syntax highlighting, outline view, breadcrumbs, and some code completion for Space Weather Modelling Framework (SWMF) configuration files, such as the BATSRUS PARAM.in file. The rules are based on the SWMF manual section 3.2.2.

Automatically highlights files ending in .in and .IN.

Features demo

Features

  • Syntax highlighting;
  • Hierarchical document tree in the outline view;
  • Breadcrumbs support;
  • Toggle comment using ! as comment character;
  • Code folding between #BEGIN_COMP and #END_COMP markers;
  • Autoclosing of #BEGIN_COMP.

Installation

This is a Visual Studio Code extension. It is best installed from the on-line extensions marketplace, or from inside VS Code Preferences/Extensions and search for swmf-grammar.

Alternatively, the extension can be built and installed manually as in the next section.

Manual installation from source code

This should only be required for developers.

  1. Clone the repository and enter into the folder

    git clone git@github.com:svaberg/SWMF-grammar.git
    cd SWMF-grammar
    
  2. Install the required packages with npm

    npm install
    
  3. Create a package using vsce

    vsce package
    

    This should generate a swmf-grammar-?.?.?.vsix file in the current directory.

  4. Manually install the extension in VS Code (you may want to replace the wildcards in the version number)

    code --install-extension swmf-grammar-?.?.?.vsix
    

To test the installation, open the current folder in VS Code

code .

and view the file demo.in.