https://github.com/kermanx/tmlanguage-previewer
Preview tmLanguage grammar files in VSCode.
https://github.com/kermanx/tmlanguage-previewer
Last synced: about 1 year ago
JSON representation
Preview tmLanguage grammar files in VSCode.
- Host: GitHub
- URL: https://github.com/kermanx/tmlanguage-previewer
- Owner: kermanx
- License: mit
- Created: 2024-06-22T07:55:04.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-02-11T07:30:31.000Z (over 1 year ago)
- Last Synced: 2025-03-18T11:39:17.774Z (about 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 365 KB
- Stars: 18
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tmLanguage Previewer
[](https://kermanx.github.io/reactive-vscode/)
A VS Code extension for previewing tmLanguage grammar files. Created with [Reactive VS Code](https://kermanx.github.io/reactive-vscode).
There is also a online version: [tmLanguage Playground](https://kermanx.github.io/tmLanguage-Playground/).
## Usage
1. Open a `.tmLanguage.json` file in VSCode. For example, `xyz.tmLanguage.json`.
2. Create a new file with the same name but with a `.example` infix. For example, `xyz.example.any`.
2. Click the icon on the top right of the editor to open the previewer.
## Development
### What's in the folder
- `package.json` - this is the manifest file in which you declare your extension and command.
- `src/*` - this is the folder containing the webview code. (DOM environment)
- `extension/*` - this is the folder containing the extension code. (Node.js environment)
### Get up and running straight away
- Run `pnpm install` to install all necessary dependencies.
- Run `pnpm dev` in a terminal to compile the extension.
- Press `F5` to open a new window with your extension loaded.
### Make changes
- You can relaunch the extension from the debug toolbar after changing code in `src/extension.ts`.
- You can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes.