Merge pull request #748 from quantified-uncertainty/vscode-0.1.2

Vscode 0.1.2
This commit is contained in:
Ozzie Gooen 2022-06-20 17:15:05 -07:00 committed by GitHub
commit 75dfb724ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 56 additions and 11 deletions

View File

@ -4,6 +4,17 @@ _[marketplace](https://marketplace.visualstudio.com/items?itemName=QURI.vscode-s
This extension provides support for [Squiggle](https://www.squiggle-language.com/) in VS Code.
Features:
- Preview `.squiggle` files in a preview pane
- Syntax highlighting for `.squiggle` and `.squiggleU` files
# Configuration
Some preview settings, e.g. whether to show the summary table or types of outputs, can be configurable on in the VS Code settings and persist between different preview sessions.
Check out the full list of Squiggle settings in the main VS Code settings.
# Build locally
We assume you ran `yarn` at the monorepo level for all dependencies.

View File

@ -0,0 +1,18 @@
{
"comments": {
"lineComment": "//",
"blockComment": ["/*", "*/"]
},
"brackets": [
["{", "}"],
["[", "]"],
["(", ")"]
],
"autoClosingPairs": [
{ "open": "{", "close": "}" },
{ "open": "[", "close": "]" },
{ "open": "(", "close": ")" },
{ "open": "'", "close": "'", "notIn": ["string", "comment"] },
{ "open": "\"", "close": "\"", "notIn": ["string", "comment"] }
]
}

View File

@ -3,7 +3,7 @@
"displayName": "Squiggle",
"description": "Squiggle language support",
"license": "MIT",
"version": "0.1.0",
"version": "0.1.2",
"publisher": "QURI",
"repository": {
"type": "git",
@ -31,7 +31,18 @@
],
"aliases": [
"Squiggle"
]
],
"configuration": "./language-configuration.json"
},
{
"id": "squiggleU",
"extensions": [
".squiggleU"
],
"aliases": [
"SquiggleU"
],
"configuration": "./language-configuration.json"
}
],
"grammars": [
@ -39,6 +50,11 @@
"language": "squiggle",
"scopeName": "source.squiggle",
"path": "./syntaxes/squiggle.tmLanguage.json"
},
{
"language": "squiggleU",
"scopeName": "source.squiggle",
"path": "./syntaxes/squiggle.tmLanguage.json"
}
],
"customEditors": [
@ -125,7 +141,7 @@
"@typescript-eslint/parser": "^5.27.0",
"eslint": "^8.18.0",
"glob": "^8.0.3",
"typescript": "^4.7.4",
"js-yaml": "^4.1.0"
"js-yaml": "^4.1.0",
"typescript": "^4.7.4"
}
}

View File

@ -1,12 +1,12 @@
import * as vscode from "vscode";
import * as uri from "vscode-uri";
import * as path from "path";
import { getWebviewContent } from "./utils";
export const registerPreviewCommand = (context: vscode.ExtensionContext) => {
context.subscriptions.push(
vscode.commands.registerTextEditorCommand("squiggle.preview", (editor) => {
// Create and show a new webview
const title = `Preview ${uri.Utils.basename(editor.document.uri)}`;
const title = `Preview ${path.basename(editor.document.uri.path)}`;
const panel = vscode.window.createWebviewPanel(
"squigglePreview",

View File

@ -18638,16 +18638,16 @@ y18n@^5.0.5:
resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55"
integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==
yallist@*, yallist@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72"
integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==
yallist@^3.0.2:
version "3.1.1"
resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd"
integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==
yallist@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72"
integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==
yaml@^1.10.0, yaml@^1.10.2, yaml@^1.7.2:
version "1.10.2"
resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b"