Skip to content
Open
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
25 changes: 25 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
module.exports = {
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:@typescript-eslint/strict',
'prettier',
],
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
tsconfigRootDir: __dirname,
project: './tsconfig.json',
ecmaVersion: 6,
sourceType: 'module',
},
plugins: ['@typescript-eslint'],
rules: {
curly: ['error', 'multi-or-nest', 'consistent'],
eqeqeq: ['error', 'always'],
'no-throw-literal': 'error',
'@typescript-eslint/non-nullable-type-assertion-style': 'off',
},
ignorePatterns: ['out', 'dist', '**/*.d.ts'],
};
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
node_modules
*.vsix
*.vsix
.idea
.vscode-test
dist
out
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
enable-pre-post-scripts = true
7 changes: 7 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
out/
dist/
**/*.d.ts
node_modules
.idea
.vscode
.vscode-test
7 changes: 7 additions & 0 deletions .prettierrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
trailingComma: all
tabWidth: 2
semi: true
singleQuote: true
bracketSpacing: true
printWidth: 120
arrowParens: avoid
5 changes: 5 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": ["dbaeumer.vscode-eslint", "amodio.tsl-problem-matcher"]
}
38 changes: 24 additions & 14 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,28 @@
// A launch configuration that launches the extension inside a new window
// A launch configuration that compiles the extension and then opens it 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}"
]
}
]
}
"version": "0.2.0",
"configurations": [
{
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
"outFiles": ["${workspaceFolder}/dist/**/*.js"],
"preLaunchTask": "${defaultBuildTask}"
},
{
"name": "Extension Tests",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
],
"outFiles": ["${workspaceFolder}/out/**/*.js", "${workspaceFolder}/dist/**/*.js"],
"preLaunchTask": "tasks: watch-tests"
}
]
}
13 changes: 13 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Place your settings in this file to overwrite default and user settings.
{
"files.exclude": {
"out": false, // set this to true to hide the "out" folder with the compiled JS files
"dist": false // set this to true to hide the "dist" folder with the compiled JS files
},
"search.exclude": {
"out": true, // set this to false to include "out" folder in search results
"dist": true // set this to false to include "dist" folder in search results
},
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off"
}
37 changes: 37 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "watch",
"problemMatcher": "$ts-webpack-watch",
"isBackground": true,
"presentation": {
"reveal": "never",
"group": "watchers"
},
"group": {
"kind": "build",
"isDefault": true
}
},
{
"type": "npm",
"script": "watch-tests",
"problemMatcher": "$tsc-watch",
"isBackground": true,
"presentation": {
"reveal": "never",
"group": "watchers"
},
"group": "build"
},
{
"label": "tasks: watch-tests",
"dependsOn": ["npm: watch", "npm: watch-tests"],
"problemMatcher": []
}
]
}
9 changes: 9 additions & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
.vscode/**
.vscode-test/**
out/**
node_modules/**
src/**
.gitignore
.yarnrc
webpack.config.js
vsc-extension-quickstart.md
**/tsconfig.json
**/.eslintrc.json
**/*.map
**/*.ts
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,27 @@
# Change Log

All notable changes to the "miniscript" extension will be documented in this file.

Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.

## [Unreleased]

### Fixed

- Fix `isa` operator highlighting; it is not called `__isa` in current MiniScript.

## [0.0.3] - 2022-11-02

### Changed

- Rewrite/update README file to reflect the extension's new home and maintenance status.

## [0.0.2] - 2022-10-29

### Fixed

- Fix repository URL in package metadata.

## [0.0.1] - 2022-10-29
- Initial public release on VS Marketplace.

- Initial public release on VS Marketplace.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ This repository contains an extension for Microsoft's VS Code (<https://code.vis

Provides basic syntax highlighting for VS Code.

![Example Screenshot of MiniScript Highlighting](images/screenshot.png "Example Screenshot of MiniScript Highlighting")
![Example Screenshot of MiniScript Highlighting](images/screenshot.png 'Example Screenshot of MiniScript Highlighting')

## Installation

The easiest way to get the extension is to search 'miniscript' in VS Code's extension tab, or install it from the [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=chaos95.miniscript). If you would like to do local development on the extension, or if you prefer not to install from the marketplace, you can do a local install from this git repository instead.

### Install from git repository

To get your extension running in VS Code, checkout the entire miniscript-syntax folder under your local extensions folder:

- Windows: %USERPROFILE%\.vscode\extensions
Expand All @@ -23,11 +24,15 @@ To get your extension running in VS Code, checkout the entire miniscript-syntax
To check it's working, try opening "Example1.ms" from the examples folder.

## Contributing

If you would like to contribute ideas, code, bug reports etc, please do. I am pretty busy with 4 kids and a full-time job, and maintaining this extension in my (very limited) spare time, but I will endeavour to respond to any issues/PRs as quickly as possible.

### Reporting bugs, requesting features, etc

Bug/issue reports and feature requests are welcome! Please take a look at the [issues](https://github.com/chaos95/miniscript-syntax/) on the github repository and feel free to add your input if someone else has already reported the same thing, or create a new issue if you can't find one already!

### Pull requests

Pull requests are also very welcome! At some point we will hopefully have a more in-depth contributor guide as well.

### Want more info?
Expand Down
27 changes: 27 additions & 0 deletions default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{ pkgs }:
pkgs.stdenv.mkDerivation {
name = "vscode-extension-miniscript-syntax";
vscodeExtUniqueId = "miniscript-syntax";
vscodeExtPublisher = "juh9870";
version = "0.0.3";

buildInputs = with pkgs; [
bash
nodejs_18
nodePackages.pnpm
vsce
];

src=./.;

buildPhase = ''
pnpm i --frozen-lockfile
# vsce package --no-dependencies
'';

installPrefix = "share/vscode/extensions/miniscript-syntax";
installPhase = ''
mkdir -p "$out/$installPrefix"
find . -mindepth 1 -maxdepth 1 | xargs -d'\n' mv -t "$out/$installPrefix/"
'';
}
Binary file added icons/Icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
60 changes: 33 additions & 27 deletions language-configuration.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,34 @@
{
"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 that can be used to surround a selection
"surroundingPairs": [
["{", "}"],
["[", "]"],
["(", ")"],
["\"", "\""],
["'", "'"]
]
}
"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 that can be used to surround a selection
"surroundingPairs": [
["{", "}"],
["[", "]"],
["(", ")"],
["\"", "\""],
["'", "'"]
],
"folding": {
"markers": {
"start": "^\\s*//\\s*#?region\\b",
"end": "^\\s*//\\s*#?end\\s+region\\b"
}
}
}
Loading