Combine English and French VS Code extensions (#622)

This commit is contained in:
Louis Gesbert 2024-05-22 16:12:38 +02:00 committed by GitHub
commit 372058bc42
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
22 changed files with 72 additions and 350 deletions

18
.github/workflows/release.yml vendored Normal file
View File

@ -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 }}

View File

@ -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

View File

@ -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}"
]
}
]
}

View File

@ -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!**

View File

@ -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"
}]
}
}

View File

@ -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

View File

@ -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}"
]
}
]
}

View File

@ -1,4 +0,0 @@
.vscode/**
.vscode-test/**
.gitignore
vsc-extension-quickstart.md

View File

@ -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

View File

@ -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!**

View File

@ -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": [
[
"{",
"}"
],
[
"[",
"]"
],
[
"(",
")"
],
[
"\"",
"\""
],
[
"'",
"'"
]
]
}

View File

@ -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"
}]
}
}

View File

@ -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 `<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.

View File

@ -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.

View File

@ -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.

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

View File

@ -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"
}]
}
}