Merge pull request #748 from quantified-uncertainty/vscode-0.1.2
Vscode 0.1.2
This commit is contained in:
commit
75dfb724ec
|
@ -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.
|
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
|
# Build locally
|
||||||
|
|
||||||
We assume you ran `yarn` at the monorepo level for all dependencies.
|
We assume you ran `yarn` at the monorepo level for all dependencies.
|
||||||
|
|
18
packages/vscode-ext/language-configuration.json
Normal file
18
packages/vscode-ext/language-configuration.json
Normal 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"] }
|
||||||
|
]
|
||||||
|
}
|
|
@ -3,7 +3,7 @@
|
||||||
"displayName": "Squiggle",
|
"displayName": "Squiggle",
|
||||||
"description": "Squiggle language support",
|
"description": "Squiggle language support",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"version": "0.1.0",
|
"version": "0.1.2",
|
||||||
"publisher": "QURI",
|
"publisher": "QURI",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
@ -31,7 +31,18 @@
|
||||||
],
|
],
|
||||||
"aliases": [
|
"aliases": [
|
||||||
"Squiggle"
|
"Squiggle"
|
||||||
]
|
],
|
||||||
|
"configuration": "./language-configuration.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "squiggleU",
|
||||||
|
"extensions": [
|
||||||
|
".squiggleU"
|
||||||
|
],
|
||||||
|
"aliases": [
|
||||||
|
"SquiggleU"
|
||||||
|
],
|
||||||
|
"configuration": "./language-configuration.json"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"grammars": [
|
"grammars": [
|
||||||
|
@ -39,6 +50,11 @@
|
||||||
"language": "squiggle",
|
"language": "squiggle",
|
||||||
"scopeName": "source.squiggle",
|
"scopeName": "source.squiggle",
|
||||||
"path": "./syntaxes/squiggle.tmLanguage.json"
|
"path": "./syntaxes/squiggle.tmLanguage.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"language": "squiggleU",
|
||||||
|
"scopeName": "source.squiggle",
|
||||||
|
"path": "./syntaxes/squiggle.tmLanguage.json"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"customEditors": [
|
"customEditors": [
|
||||||
|
@ -125,7 +141,7 @@
|
||||||
"@typescript-eslint/parser": "^5.27.0",
|
"@typescript-eslint/parser": "^5.27.0",
|
||||||
"eslint": "^8.18.0",
|
"eslint": "^8.18.0",
|
||||||
"glob": "^8.0.3",
|
"glob": "^8.0.3",
|
||||||
"typescript": "^4.7.4",
|
"js-yaml": "^4.1.0",
|
||||||
"js-yaml": "^4.1.0"
|
"typescript": "^4.7.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
import * as vscode from "vscode";
|
import * as vscode from "vscode";
|
||||||
import * as uri from "vscode-uri";
|
import * as path from "path";
|
||||||
import { getWebviewContent } from "./utils";
|
import { getWebviewContent } from "./utils";
|
||||||
|
|
||||||
export const registerPreviewCommand = (context: vscode.ExtensionContext) => {
|
export const registerPreviewCommand = (context: vscode.ExtensionContext) => {
|
||||||
context.subscriptions.push(
|
context.subscriptions.push(
|
||||||
vscode.commands.registerTextEditorCommand("squiggle.preview", (editor) => {
|
vscode.commands.registerTextEditorCommand("squiggle.preview", (editor) => {
|
||||||
// Create and show a new webview
|
// 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(
|
const panel = vscode.window.createWebviewPanel(
|
||||||
"squigglePreview",
|
"squigglePreview",
|
||||||
|
|
10
yarn.lock
10
yarn.lock
|
@ -18638,16 +18638,16 @@ y18n@^5.0.5:
|
||||||
resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55"
|
resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55"
|
||||||
integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==
|
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:
|
yallist@^3.0.2:
|
||||||
version "3.1.1"
|
version "3.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd"
|
resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd"
|
||||||
integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==
|
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:
|
yaml@^1.10.0, yaml@^1.10.2, yaml@^1.7.2:
|
||||||
version "1.10.2"
|
version "1.10.2"
|
||||||
resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b"
|
resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user