-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b3a7e3b
commit e439815
Showing
10 changed files
with
113 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# local and generated files not to be committed | ||
node_modules/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[submodule "subprojects/omnetpp-textmate-ned"] | ||
path = subprojects/omnetpp-textmate-ned | ||
url = https://github.com/omnetpp/omnetpp-textmate-ned | ||
[submodule "subprojects/omnetpp-textmate-msg"] | ||
path = subprojects/omnetpp-textmate-msg | ||
url = https://github.com/omnetpp/omnetpp-textmate-msg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,25 @@ | ||
TextMate grammar and Visual Studio Code extension for the OMNeT++ NED language. | ||
TextMate grammar and Visual Studio Code extension for the OMNeT++ NED and MSG languages. | ||
|
||
## Features | ||
|
||
Syntax highlighting of .ned files. | ||
Syntax highlighting of .ned and .msg files. | ||
|
||
## Requirements | ||
|
||
VS Code version 1.92 or higher. | ||
|
||
## Building locally | ||
|
||
Node.js is required for building the extension locally (see https://nodejs.org for install instructions). | ||
|
||
- Clone this repo | ||
- Run `refresh_submodules` to fetch the grammar submodules | ||
- Install `vsce`: `npm install -g @vscode/vsce` | ||
|
||
To build the .vsix file, run: | ||
|
||
`npm run package` | ||
|
||
## Installing | ||
|
||
In VSCode/Extensions, select 'Install from VSIX...' from the ... menu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ | ||
"name": "omnetpp-vscode", | ||
"displayName": "omnetpp-vscode", | ||
"description": "Extension for the OMNeT++ NED and MSG languages", | ||
"version": "0.0.1", | ||
"publisher": "opensim", | ||
"repository": "https://github.com/adamgeorge309/omnetpp-vscode", | ||
"icon": "logo128.png", | ||
"engines": { | ||
"vscode": "^1.92.0" | ||
}, | ||
"categories": [ | ||
"Programming Languages" | ||
], | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\"", | ||
"package": "vsce package", | ||
"deploy": "vsce publish --yarn" | ||
}, | ||
"contributes": { | ||
"languages": [ | ||
{ | ||
"id": "omnetpp-ned", | ||
"extensions": [ | ||
".ned" | ||
], | ||
"configuration": "./language-configuration.json" | ||
}, | ||
{ | ||
"id": "omnetpp-msg", | ||
"extensions": [".msg"], | ||
"configuration": "./language-configuration.json" | ||
} | ||
], | ||
"grammars": [ | ||
{ | ||
"language": "omnetpp-ned", | ||
"scopeName": "source.ned", | ||
"path": "./syntaxes/ned.tmLanguage.json" | ||
}, | ||
{ | ||
"language": "omnetpp-msg", | ||
"scopeName": "source.msg", | ||
"path": "./syntaxes/omnetpp-msg.tmLanguage.json" | ||
} | ||
] | ||
}, | ||
"devDependencies": { | ||
"@vscode/vsce": "^3.0.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
echo 'Refreshing submodules....' | ||
cd subprojects | ||
git submodule init && git submodule update |
Submodule omnetpp-textmate-msg
added at
e14a55
Submodule omnetpp-textmate-ned
added at
8b5453
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../subprojects/omnetpp-textmate-ned/syntaxes/ned.tmLanguage.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../subprojects/omnetpp-textmate-msg/syntaxes/omnetpp-msg.tmLanguage.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Welcome to your VS Code Extension | ||
|
||
## What's in the folder | ||
|
||
* This folder contains all of the files necessary for your extension. | ||
* `package.json` - this is the manifest file in which you declare your language support and define the location of the grammar file that has been copied into your extension. | ||
* `syntaxes/ned.tmLanguage.json` - this is the Text mate grammar file that is used for tokenization. | ||
* `language-configuration.json` - this is the language configuration, defining the tokens that are used for comments and brackets. | ||
|
||
## Get up and running straight away | ||
|
||
* Make sure the language configuration settings in `language-configuration.json` are accurate. | ||
* Press `F5` to open a new window with your extension loaded. | ||
* Create a new file with a file name suffix matching your language. | ||
* Verify that syntax highlighting works and that the language configuration settings are working. | ||
|
||
## Make changes | ||
|
||
* You can relaunch the extension from the debug toolbar after making changes to the files listed above. | ||
* You can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes. | ||
|
||
## Add more language features | ||
|
||
* To add features such as IntelliSense, hovers and validators check out the VS Code extenders documentation at https://code.visualstudio.com/docs | ||
|
||
## Install your extension | ||
|
||
* To start using your extension with Visual Studio Code copy it into the `<user home>/.vscode/extensions` folder and restart Code. | ||
* To share your extension with the world, read on https://code.visualstudio.com/docs about publishing an extension. |