Skip to content

Commit 100369a

Browse files
committed
breaking!: remove complexity and focus on syntax only
1 parent ec6fa41 commit 100369a

6 files changed

Lines changed: 175 additions & 719 deletions

File tree

Default.sublime-commands

Lines changed: 0 additions & 18 deletions
This file was deleted.

Main.sublime-menu

Lines changed: 0 additions & 35 deletions
This file was deleted.

README.md

Lines changed: 21 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,38 @@
1-
# Sublime Tera Syntax
1+
# Tera Syntax for Sublime Text
22

3-
A Sublime Text package for Tera template syntax highlighting with automatic detection of underlying file types.
3+
A simple syntax highlighting package for Tera templates in Sublime Text.
44

55
## Features
66

77
- Syntax highlighting for Tera templates (`.tera` files)
8-
- Automatic detection of base language based on file extension (e.g., `file.html.tera` uses HTML+Tera syntax)
9-
- Support for nested variable properties (like `.hex` in `{{variable.hex}}`)
10-
- Highlights Tera expressions, tags, and comments
11-
12-
## How It Works
13-
14-
The package includes:
15-
16-
1. A base Tera syntax definition for highlighting template tags and expressions
17-
2. A dynamic syntax detector that:
18-
- Analyzes your file name to determine the underlying language
19-
- Automatically generates combined syntax definitions
20-
- Applies the correct highlighting
21-
22-
## Examples
23-
24-
- `page.html.tera` → HTML + Tera highlighting
25-
- `config.toml.tera` → TOML + Tera highlighting
26-
- `style.css.tera` → CSS + Tera highlighting
27-
- `data.json.tera` → JSON + Tera highlighting
28-
29-
If no base extension is detected, HTML highlighting is used as the default.
30-
31-
## Commands
32-
33-
- **Toggle Debug Mode**: Enables logging for troubleshooting
34-
- **Clear Syntax Cache**: Clears cached syntax definitions
8+
- HTML syntax highlighting for template content
9+
- Support for all Tera template constructs:
10+
- Comments `{# ... #}`
11+
- Expressions `{{ ... }}`
12+
- Statements `{% ... %}`
13+
- Blocks, conditionals, loops, etc.
3514

3615
## Installation
3716

38-
### Package Control
39-
40-
1. Make sure you have [Package Control](https://packagecontrol.io/) installed
41-
2. Open the command palette (Ctrl+Shift+P / Cmd+Shift+P)
42-
3. Select `Package Control: Add Repository`
43-
4. Paste `https://github.com/MuntasirSZN/sublime-tera`
44-
4517
### Manual Installation
4618

4719
1. Download or clone this repository
4820
2. Go to `Preferences > Browse Packages...` in Sublime Text
49-
3. Copy the `SublimeTera` folder into the Packages directory
21+
3. Copy the `TeraSyntax` folder into the Packages directory
5022
4. Restart Sublime Text
5123

52-
## License
24+
### Package Control (Coming Soon)
5325

54-
MIT License
26+
Once this package is available in Package Control, you'll be able to install it by:
27+
28+
1. Opening the command palette (Ctrl+Shift+P / Cmd+Shift+P)
29+
2. Selecting `Package Control: Install Package`
30+
3. Searching for `Tera Syntax` and pressing Enter
5531

56-
## Thanks To
32+
## Usage
5733

58-
@uncenter for [vscode-tera](https://github.com/uncenter/vscode-tera). This repo is a port of vscode's tmLanguage.
34+
Files with `.tera` extension will automatically use this syntax.
35+
36+
## License
37+
38+
MIT License

0 commit comments

Comments
 (0)