diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..2eb9f1e1 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,18 @@ +name: Release +on: + release: + types: + - created + +jobs: + vscode: + name: Publish VS Code extension + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Publish VS Code extension + working-directory: syntax_highlighting/vscode + run: ln -s ../../LICENSE.txt . && npx vsce publish + env: + VSCE_PAT: ${{ secrets.VSCE_PAT }} diff --git a/syntax_highlighting/en/setup_vscode.sh b/syntax_highlighting/en/setup_vscode.sh deleted file mode 100755 index 16f87d59..00000000 --- a/syntax_highlighting/en/setup_vscode.sh +++ /dev/null @@ -1,12 +0,0 @@ -#! /usr/bin/env sh - -set -eu - -FILE=~/.vscode/extensions/catala-en -SCRIPT=`realpath $0` -SCRIPTPATH=`dirname $SCRIPT` - -if [ ! -L "$FILE" ]; then - echo "Creating link" - ln -s -f $SCRIPTPATH/vscode "$FILE" -fi diff --git a/syntax_highlighting/en/vscode/.vscode/launch.json b/syntax_highlighting/en/vscode/.vscode/launch.json deleted file mode 100644 index 7bc18a44..00000000 --- a/syntax_highlighting/en/vscode/.vscode/launch.json +++ /dev/null @@ -1,18 +0,0 @@ -// 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", - "runtimeExecutable": "${execPath}", - "args": [ - "--extensionDevelopmentPath=${workspaceFolder}" - ] - } - ] -} \ No newline at end of file diff --git a/syntax_highlighting/en/vscode/README.md b/syntax_highlighting/en/vscode/README.md deleted file mode 100644 index e54bc79b..00000000 --- a/syntax_highlighting/en/vscode/README.md +++ /dev/null @@ -1,65 +0,0 @@ -# catala-en README - -This is the README for your extension "catala-en". After writing up a brief description, we recommend including the following sections. - -## Features - -Describe specific features of your extension including screenshots of your extension in action. Image paths are relative to this README file. - -For example if there is an image subfolder under your extension project workspace: - -\!\[feature X\]\(images/feature-x.png\) - -> Tip: Many popular extensions utilize animations. This is an excellent way to show off your extension! We recommend short, focused animations that are easy to follow. - -## Requirements - -If you have any requirements or dependencies, add a section describing those and how to install and configure them. - -## Extension Settings - -Include if your extension adds any VS Code settings through the `contributes.configuration` extension point. - -For example: - -This extension contributes the following settings: - -* `myExtension.enable`: enable/disable this extension -* `myExtension.thing`: set to `blah` to do something - -## Known Issues - -Calling out known issues can help limit users opening duplicate issues against your extension. - -## Release Notes - -Users appreciate release notes as you update your extension. - -### 1.0.0 - -Initial release of ... - -### 1.0.1 - -Fixed issue #. - -### 1.1.0 - -Added features X, Y, and Z. - ------------------------------------------------------------------------------------------------------------ - -## Working with Markdown - -**Note:** You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts: - -* Split the editor (`Cmd+\` on macOS or `Ctrl+\` on Windows and Linux) -* Toggle preview (`Shift+CMD+V` on macOS or `Shift+Ctrl+V` on Windows and Linux) -* Press `Ctrl+Space` (Windows, Linux) or `Cmd+Space` (macOS) to see a list of Markdown snippets - -### For more information - -* [Visual Studio Code's Markdown Support](http://code.visualstudio.com/docs/languages/markdown) -* [Markdown Syntax Reference](https://help.github.com/articles/markdown-basics/) - -**Enjoy!** diff --git a/syntax_highlighting/en/vscode/package.json b/syntax_highlighting/en/vscode/package.json deleted file mode 100644 index dd540245..00000000 --- a/syntax_highlighting/en/vscode/package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "catala-en", - "displayName": "catala-en", - "description": "Syntax highlighting for English Catala programs", - "version": "0.0.1", - "engines": { - "vscode": "^1.48.0" - }, - "categories": [ - "Programming Languages" - ], - "contributes": { - "languages": [{ - "id": "catala_en", - "aliases": ["catala_en", "catala_en"], - "extensions": [".catala_en"], - "configuration": "./language-configuration.json" - }], - "grammars": [{ - "language": "catala_en", - "scopeName": "source.catala_en", - "path": "./syntaxes/catalavs.xml" - }] - } -} \ No newline at end of file diff --git a/syntax_highlighting/fr/setup_vscode.sh b/syntax_highlighting/fr/setup_vscode.sh deleted file mode 100755 index 8187cabf..00000000 --- a/syntax_highlighting/fr/setup_vscode.sh +++ /dev/null @@ -1,12 +0,0 @@ -#! /usr/bin/env sh - -set -eu - -FILE=~/.vscode/extensions/catala-fr -SCRIPT=`realpath $0` -SCRIPTPATH=`dirname $SCRIPT` - -if [ ! -L "$FILE" ]; then - echo "Creating link" - ln -s -f $SCRIPTPATH/vscode "$FILE" -fi diff --git a/syntax_highlighting/fr/vscode/.vscode/launch.json b/syntax_highlighting/fr/vscode/.vscode/launch.json deleted file mode 100644 index 7bc18a44..00000000 --- a/syntax_highlighting/fr/vscode/.vscode/launch.json +++ /dev/null @@ -1,18 +0,0 @@ -// 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", - "runtimeExecutable": "${execPath}", - "args": [ - "--extensionDevelopmentPath=${workspaceFolder}" - ] - } - ] -} \ No newline at end of file diff --git a/syntax_highlighting/fr/vscode/.vscodeignore b/syntax_highlighting/fr/vscode/.vscodeignore deleted file mode 100644 index f369b5e5..00000000 --- a/syntax_highlighting/fr/vscode/.vscodeignore +++ /dev/null @@ -1,4 +0,0 @@ -.vscode/** -.vscode-test/** -.gitignore -vsc-extension-quickstart.md diff --git a/syntax_highlighting/fr/vscode/CHANGELOG.md b/syntax_highlighting/fr/vscode/CHANGELOG.md deleted file mode 100644 index 295eb6e1..00000000 --- a/syntax_highlighting/fr/vscode/CHANGELOG.md +++ /dev/null @@ -1,9 +0,0 @@ -# Change Log - -All notable changes to the "catala-fr" extension will be documented in this file. - -Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file. - -## [Unreleased] - -- Initial release \ No newline at end of file diff --git a/syntax_highlighting/fr/vscode/README.md b/syntax_highlighting/fr/vscode/README.md deleted file mode 100644 index 5148918e..00000000 --- a/syntax_highlighting/fr/vscode/README.md +++ /dev/null @@ -1,65 +0,0 @@ -# catala-fr README - -This is the README for your extension "catala-fr". After writing up a brief description, we recommend including the following sections. - -## Features - -Describe specific features of your extension including screenshots of your extension in action. Image paths are relative to this README file. - -For example if there is an image subfolder under your extension project workspace: - -\!\[feature X\]\(images/feature-x.png\) - -> Tip: Many popular extensions utilize animations. This is an excellent way to show off your extension! We recommend short, focused animations that are easy to follow. - -## Requirements - -If you have any requirements or dependencies, add a section describing those and how to install and configure them. - -## Extension Settings - -Include if your extension adds any VS Code settings through the `contributes.configuration` extension point. - -For example: - -This extension contributes the following settings: - -* `myExtension.enable`: enable/disable this extension -* `myExtension.thing`: set to `blah` to do something - -## Known Issues - -Calling out known issues can help limit users opening duplicate issues against your extension. - -## Release Notes - -Users appreciate release notes as you update your extension. - -### 1.0.0 - -Initial release of ... - -### 1.0.1 - -Fixed issue #. - -### 1.1.0 - -Added features X, Y, and Z. - ------------------------------------------------------------------------------------------------------------ - -## Working with Markdown - -**Note:** You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts: - -* Split the editor (`Cmd+\` on macOS or `Ctrl+\` on Windows and Linux) -* Toggle preview (`Shift+CMD+V` on macOS or `Shift+Ctrl+V` on Windows and Linux) -* Press `Ctrl+Space` (Windows, Linux) or `Cmd+Space` (macOS) to see a list of Markdown snippets - -### For more information - -* [Visual Studio Code's Markdown Support](http://code.visualstudio.com/docs/languages/markdown) -* [Markdown Syntax Reference](https://help.github.com/articles/markdown-basics/) - -**Enjoy!** diff --git a/syntax_highlighting/fr/vscode/language-configuration.json b/syntax_highlighting/fr/vscode/language-configuration.json deleted file mode 100644 index be68f247..00000000 --- a/syntax_highlighting/fr/vscode/language-configuration.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "comments": { - // symbol used for single line comment. Remove this entry if your language does not support line comments - "lineComment": "#", - }, - // symbols used as brackets - "brackets": [ - [ - "{", - "}" - ], - [ - "[", - "]" - ], - [ - "(", - ")" - ] - ], - // symbols that are auto closed when typing - "autoClosingPairs": [ - [ - "{", - "}" - ], - [ - "[", - "]" - ], - [ - "(", - ")" - ], - [ - "\"", - "\"" - ], - [ - "'", - "'" - ] - ], - // symbols that can be used to surround a selection - "surroundingPairs": [ - [ - "{", - "}" - ], - [ - "[", - "]" - ], - [ - "(", - ")" - ], - [ - "\"", - "\"" - ], - [ - "'", - "'" - ] - ] -} \ No newline at end of file diff --git a/syntax_highlighting/fr/vscode/package.json b/syntax_highlighting/fr/vscode/package.json deleted file mode 100644 index 86a0e6c1..00000000 --- a/syntax_highlighting/fr/vscode/package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "catala-fr", - "displayName": "catala-fr", - "description": "Syntax highlighting for French Catala programs", - "version": "0.0.1", - "engines": { - "vscode": "^1.48.0" - }, - "categories": [ - "Programming Languages" - ], - "contributes": { - "languages": [{ - "id": "catala_fr", - "aliases": ["catala_fr", "catala_fr"], - "extensions": [".catala_fr"], - "configuration": "./language-configuration.json" - }], - "grammars": [{ - "language": "catala_fr", - "scopeName": "source.catala_fr", - "path": "./syntaxes/catalavs.xml" - }] - } -} \ No newline at end of file diff --git a/syntax_highlighting/fr/vscode/vsc-extension-quickstart.md b/syntax_highlighting/fr/vscode/vsc-extension-quickstart.md deleted file mode 100644 index 5f2b99e5..00000000 --- a/syntax_highlighting/fr/vscode/vsc-extension-quickstart.md +++ /dev/null @@ -1,29 +0,0 @@ -# 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/catalavs.xml` - 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 `/.vscode/extensions` folder and restart Code. -* To share your extension with the world, read on https://code.visualstudio.com/docs about publishing an extension. diff --git a/syntax_highlighting/en/vscode/.vscodeignore b/syntax_highlighting/vscode/.vscodeignore similarity index 100% rename from syntax_highlighting/en/vscode/.vscodeignore rename to syntax_highlighting/vscode/.vscodeignore diff --git a/syntax_highlighting/en/vscode/CHANGELOG.md b/syntax_highlighting/vscode/CHANGELOG.md similarity index 65% rename from syntax_highlighting/en/vscode/CHANGELOG.md rename to syntax_highlighting/vscode/CHANGELOG.md index 399e9815..4bd7b78e 100644 --- a/syntax_highlighting/en/vscode/CHANGELOG.md +++ b/syntax_highlighting/vscode/CHANGELOG.md @@ -1,6 +1,6 @@ # Change Log -All notable changes to the "catala-en" extension will be documented in this file. +All notable changes to the "catala" extension will be documented in this file. Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file. diff --git a/syntax_highlighting/vscode/README.md b/syntax_highlighting/vscode/README.md new file mode 100644 index 00000000..bec7ddf9 --- /dev/null +++ b/syntax_highlighting/vscode/README.md @@ -0,0 +1,10 @@ +# catala README + +VScode extension for the Catala language: https://catala-lang.org + +Files with english syntax (extension `.catala_en`) and french syntax (extension +`.catala_fr`) are supported. + +## Requirements + +See https://github.com/CatalaLang/catala on how to install the Catala compiler. diff --git a/syntax_highlighting/en/vscode/language-configuration.json b/syntax_highlighting/vscode/language-configuration.json similarity index 100% rename from syntax_highlighting/en/vscode/language-configuration.json rename to syntax_highlighting/vscode/language-configuration.json diff --git a/syntax_highlighting/vscode/logo.png b/syntax_highlighting/vscode/logo.png new file mode 100644 index 00000000..4d85ce14 Binary files /dev/null and b/syntax_highlighting/vscode/logo.png differ diff --git a/syntax_highlighting/vscode/package.json b/syntax_highlighting/vscode/package.json new file mode 100644 index 00000000..c5aadf18 --- /dev/null +++ b/syntax_highlighting/vscode/package.json @@ -0,0 +1,43 @@ +{ + "name": "catala", + "displayName": "Catala", + "publisher": "catalalang", + "description": "Syntax highlighting for Catala programs", + "version": "0.10.0", + "license": "Apache-2.0", + "private": true, + "engines": { + "vscode": "^1.48.0" + }, + "categories": [ + "Programming Languages" + ], + "icon": "logo.png", + "repository": { + "type": "git", + "url": "https://github.com/CatalaLang/catala", + "directory": "syntax_highlighting/vscode" + }, + "contributes": { + "languages": [{ + "id": "catala_en", + "aliases": ["Catala (English)"], + "extensions": [".catala_en"], + "configuration": "./language-configuration.json" + }, { + "id": "catala_fr", + "aliases": ["Catala (French)"], + "extensions": [".catala_fr"], + "configuration": "./language-configuration.json" + }], + "grammars": [{ + "language": "catala_en", + "scopeName": "source.catala_en", + "path": "./syntaxes/en.xml" + }, { + "language": "catala_fr", + "scopeName": "source.catala_fr", + "path": "./syntaxes/fr.xml" + }] + } +} diff --git a/syntax_highlighting/en/vscode/syntaxes/catalavs.xml b/syntax_highlighting/vscode/syntaxes/en.xml similarity index 100% rename from syntax_highlighting/en/vscode/syntaxes/catalavs.xml rename to syntax_highlighting/vscode/syntaxes/en.xml diff --git a/syntax_highlighting/fr/vscode/syntaxes/catalavs.xml b/syntax_highlighting/vscode/syntaxes/fr.xml similarity index 100% rename from syntax_highlighting/fr/vscode/syntaxes/catalavs.xml rename to syntax_highlighting/vscode/syntaxes/fr.xml diff --git a/syntax_highlighting/en/vscode/vsc-extension-quickstart.md b/syntax_highlighting/vscode/vsc-extension-quickstart.md similarity index 100% rename from syntax_highlighting/en/vscode/vsc-extension-quickstart.md rename to syntax_highlighting/vscode/vsc-extension-quickstart.md