Skip to content

Commit

Permalink
feat: add pikchr syntax highlighting
Browse files Browse the repository at this point in the history
let's start with something
  • Loading branch information
senyai committed Mar 24, 2024
1 parent 77ce5bb commit a98a706
Show file tree
Hide file tree
Showing 16 changed files with 1,569 additions and 4 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/fossil.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,8 @@ jobs:
# when running locally using `gh act` command
run: sudo apt-get install -y fossil

- name: Run tests and coverage
- name: Run code tests and coverage
run: xvfb-run -a npm run coverage-ci $GITHUB_STEP_SUMMARY

- name: Run pikchr grammar tests
run: npm run grammar-test
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"fslckout",
"humanise",
"outfile",
"pikchr",
"repourl",
"sequentialize",
"Technote",
Expand Down
2 changes: 2 additions & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ docs/
images/
node_modules
src/
pikchr/test/*
pikchr/*.py
33 changes: 30 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1063,6 +1063,31 @@
}
]
}
],
"languages": [
{
"id": "pikchr",
"extensions": [
".pikchr"
],
"icon": {
"dark": "pikchr/assets/pikchr.svg",
"light": "pikchr/assets/pikchr.svg"
}
}
],
"grammars": [
{
"language": "pikchr",
"scopeName": "source.pikchr",
"path": "./pikchr/pikchr.tmLanguage.json",
"injectTo": [
"text.html.markdown"
],
"embeddedLanguages": {
"meta.embedded.block.pikchr": "pikchr"
}
}
]
},
"scripts": {
Expand All @@ -1078,7 +1103,8 @@
"lint": "eslint ./src --ext .ts src media",
"lint:fix": "eslint --fix --ext .ts src media",
"esbuild-base": "esbuild ./src/main.ts --bundle --outfile=out/main.js --external:vscode --format=cjs --platform=node",
"esbuild": "npm run esbuild-base -- --sourcemap"
"esbuild": "npm run esbuild-base -- --sourcemap",
"grammar-test": "vscode-tmgrammar-test ./pikchr/test/*.test.pikchr"
},
"dependencies": {
"vscode-nls": "^5.0.1"
Expand All @@ -1105,11 +1131,12 @@
"mocha": "~10.2.0",
"prettier": "~2.8.8",
"sinon": "~17.0.1",
"typescript": "^5.2.2"
"typescript": "^5.2.2",
"vscode-tmgrammar-test": "^0.1.3"
},
"__metadata": {
"id": "e828bfe6-95e7-4c7a-a334-ae2cc5ba8788",
"publisherDisplayName": "koog1000",
"publisherId": "8e4cabe1-5c1f-4bf5-bbf3-8bb8d5de842c"
}
}
}
3 changes: 3 additions & 0 deletions pikchr/assets/pikchr.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit a98a706

Please sign in to comment.