Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improving Susan templates, MOS Scripts #2

Merged
merged 1 commit into from
Jun 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .github/workflows/createPackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@ jobs:
node-version: 14
registry-url: https://registry.npmjs.org/
- name: Install the dependencies
run: npm i
- name: Install vsce
run: npm i -g vsce
run: npm install
- name: Build package
run: vsce package
run: npm run build
- name: Archive vsix package
uses: actions/upload-artifact@v2
with:
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
.vscode/
.vscode/settings.json
*.vsix
node_modules/
syntaxes/*.tmGrammar.json
18 changes: 18 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// A launch configuration that launches the extension inside a new window
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"version": "0.2.0",
"configurations": [
{
"name": "Extension",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
],
"preLaunchTask": "npm: prebuild"
}
]
}
12 changes: 9 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
# Change Log
All notable changes to the "MetaModelica" extension will be documented in this file.

## [1.0.0] - 2023-06-29

- Fixed syntax highlighting for Susan template language
- Modelica syntax highlighting within `loadString` functions of MOS scripts
- Changed tmGrammar to YAML files

## [0.1.0] - 2022-02-08

- Initial release based on Modelica extension (version v0.0.4) by Danny Moesch
https://github.com/SimplyDanny/modelica-language-vscode
- Adding basic MetaModelica (.mo) and Susan (.tpl) support
- Initial release based on Modelica extension (version v0.0.4) by Danny Moesch
https://github.com/SimplyDanny/modelica-language-vscode
- Adding basic MetaModelica (.mo) and Susan (.tpl) support
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ This extension is based on the Modelica extension taken from

### Syntax Highlighting

![Modelica](https://github.com/AnHeuermann/modelica-language-vscode/raw/master/images/modelica.png)
![Modelica](./images/modelica.png)

![MetaModelica](https://github.com/AnHeuermann/modelica-language-vscode/raw/master/images/metamodelica.png)
![MetaModelica](./images/metamodelica.png)

![Modelica](https://github.com/AnHeuermann/modelica-language-vscode/raw/master/images/susan-template.png)
![Susan](./images/susan-template.png)

![OpenModelica Scripting](./images/scripting.png)

### Snippets

Expand Down
Binary file added images/scripting.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 36 additions & 8 deletions language-configuration-susan.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,36 @@
"brackets": [
["{", "}"],
["[", "]"],
["(", ")"]
["(", ")"],
["<<",">>"],
["<%", "%>"]
],
"autoClosingPairs": [
["{", "}"],
["[", "]"],
["(", ")"],
["\"", "\""],
["'", "'"],
{
"open": "{",
"close": "}",
"notIn": ["string"]
},
{
"open": "[",
"close": "]",
"notIn": ["string"]
},
{
"open": "(",
"close": ")",
"notIn": ["string"]
},
{
"open": "\"",
"close": "\"",
"notIn": ["string"]
},
{
"open": "'",
"close": "'",
"notIn": ["string"]
},
["<<",">>"],
["<%", "%>"]
],
Expand All @@ -25,5 +47,11 @@
["'", "'"],
["<<",">>"],
["<%", "%>"]
]
}
],
"folding": {
"markers": {
"start": "<<",
"end": ">>"
}
}
}
12 changes: 10 additions & 2 deletions language-configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,16 @@
["{", "}"],
["[", "]"],
["(", ")"],
["\"", "\""],
["'", "'"]
{
"open": "\"",
"close": "\"",
"notIn": ["string"]
},
{
"open": "'",
"close": "'",
"notIn": ["string"]
},
],
"surroundingPairs": [
["{", "}"],
Expand Down
Loading