Tidy README and package configuration
This commit is contained in:
parent
3209ca95b9
commit
86c5b55800
|
@ -11,3 +11,5 @@ Initial release with syntax highlighting.
|
||||||
Added hierarchical outline view.
|
Added hierarchical outline view.
|
||||||
### 0.2.2
|
### 0.2.2
|
||||||
Fixed image in README to reflect new features.
|
Fixed image in README to reflect new features.
|
||||||
|
### 0.2.3
|
||||||
|
Tidy README and clean up `devDependencies`.
|
||||||
|
|
45
README.md
45
README.md
|
@ -1,17 +1,50 @@
|
||||||
# SWMF configuration file syntax highlighting
|
# SWMF configuration file syntax
|
||||||
|
|
||||||
Syntax highlighting and some code completion for [Space Weather Modelling Framework (SWMF)](http://csem.engin.umich.edu/tools/swmf/) configuration files, such as the BATSRUS `PARAM.in` file. The rules are based on the [SWMF manual](http://csem.engin.umich.edu/tools/swmf/documentation/SWMF.pdf) section 3.2.2.
|
> This is a Visual Studio Code extension and should be installed from the [VS Code extensions marketplace](https://marketplace.visualstudio.com/items?itemName=svaberg.swmf-grammar)
|
||||||
|
|
||||||
|
This extension provides syntax highlighting, outline view, and some code completion for [Space Weather Modelling Framework (SWMF)](http://csem.engin.umich.edu/tools/swmf/) configuration files, such as the BATSRUS `PARAM.in` file. The rules are based on the [SWMF manual](http://csem.engin.umich.edu/tools/swmf/documentation/SWMF.pdf) section 3.2.2.
|
||||||
|
|
||||||
Automatically highlights files ending in `.in` and `.IN`.
|
Automatically highlights files ending in `.in` and `.IN`.
|
||||||
|
|
||||||
A document tree is also provided in the outline view.
|
![Features demo](images/demo.png)
|
||||||
|
|
||||||
![highlight and folding demo](images/demo.png)
|
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
* Syntax highlighting
|
* Syntax highlighting
|
||||||
* Comment/uncomment using `!` as comment character.
|
|
||||||
* Hierarchical document tree in outline view.
|
* Hierarchical document tree in outline view.
|
||||||
|
* Toggle comment using `!` as comment character.
|
||||||
* Code folding between `#BEGIN_COMP` and `#END_COMP` markers.
|
* Code folding between `#BEGIN_COMP` and `#END_COMP` markers.
|
||||||
* Autoclosing of `#BEGIN_COMP`.
|
* Autoclosing of `#BEGIN_COMP`.
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
This is a [Visual Studio Code](https://code.visualstudio.com/download) extension. It is best installed from the [on-line extensions marketplace](https://marketplace.visualstudio.com/items?itemName=svaberg.swmf-grammar), or from inside VS Code `Preferences/Extensions` and search for `swmf-grammar`.
|
||||||
|
|
||||||
|
### Alternative installation from source code
|
||||||
|
|
||||||
|
This should only be required for developers.
|
||||||
|
|
||||||
|
1. Clone the repository and enter into the folder
|
||||||
|
```bash
|
||||||
|
git clone git@github.com:svaberg/SWMF-grammar.git
|
||||||
|
cd SWMF-grammar
|
||||||
|
```
|
||||||
|
2. Install the required packages
|
||||||
|
```bash
|
||||||
|
npm install
|
||||||
|
```
|
||||||
|
3. Create a package
|
||||||
|
```bash
|
||||||
|
vsce package
|
||||||
|
```
|
||||||
|
This should generate a `.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)
|
||||||
|
```bash
|
||||||
|
code --install-extension swmf-grammar-?.?.?.vsix
|
||||||
|
```
|
||||||
|
|
||||||
|
To test the installation, open the current folder in VS Code
|
||||||
|
```bash
|
||||||
|
code .
|
||||||
|
```
|
||||||
|
and view the file `demo.in`.
|
13
package.json
13
package.json
|
@ -1,18 +1,20 @@
|
||||||
{
|
{
|
||||||
"name": "swmf-grammar",
|
"name": "swmf-grammar",
|
||||||
"displayName": "swmf-grammar",
|
"displayName": "SWMF Configuration language support",
|
||||||
"description": "SWMF Configuration grammar for VS Code",
|
"description": "Syntax highlights and outline view for SWMF configuration files",
|
||||||
"version": "0.2.2",
|
"version": "0.2.2",
|
||||||
"publisher": "svaberg",
|
"publisher": "svaberg",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/svaberg/SWMF-grammar"
|
"url": "https://github.com/svaberg/SWMF-grammar"
|
||||||
},
|
},
|
||||||
|
"license": "MIT License",
|
||||||
"engines": {
|
"engines": {
|
||||||
"vscode": "^1.40.0"
|
"vscode": "^1.40.0"
|
||||||
},
|
},
|
||||||
"categories": [
|
"categories": [
|
||||||
"Programming Languages"
|
"Programming Languages",
|
||||||
|
"Formatters"
|
||||||
],
|
],
|
||||||
"main": "./out/extension.js",
|
"main": "./out/extension.js",
|
||||||
"activationEvents": [
|
"activationEvents": [
|
||||||
|
@ -44,11 +46,10 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"vscode:prepublish": "npm run compile",
|
"vscode:prepublish": "npm run compile",
|
||||||
"compile": "tsc -p ./",
|
"compile": "tsc -p ./",
|
||||||
"watch": "tsc -watch -p ./",
|
"watch": "tsc -watch -p ./"
|
||||||
"pretest": "npm run compile",
|
|
||||||
"test": "node ./out/test/runTest.js"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"typescript": "^3.7.2",
|
||||||
"vscode": "^1.1.36"
|
"vscode": "^1.1.36"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user