Skip to content

Commit fb446fb

Browse files
committed
Initial Commit
0 parents  commit fb446fb

21 files changed

+3076
-0
lines changed

.gitattributes

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# exclude from sublime-package
2+
.github/ export-ignore
3+
.gitattributes export-ignore
4+
.gitignore export-ignore
5+
*.cmd export-ignore
6+
preview.* export-ignore
7+
tests/ export-ignore
8+
9+
# linguist language settings
10+
*.sublime-completions linguist-language=JSONC
11+
*.sublime-settings linguist-language=JSONC
12+
*.sublime-syntax linguist-language=YAML
13+
*.tmPreferences linguist-language=XML
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: CI Syntax Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- 'master'
7+
tags-ignore:
8+
- '**'
9+
paths:
10+
- '.github/workflows/ci-syntax-tests.yml'
11+
- '**.sublime-syntax'
12+
- '**/syntax_test_*'
13+
- '**.tmPreferences'
14+
pull_request:
15+
paths:
16+
- '.github/workflows/ci-syntax-tests.yml'
17+
- '**.sublime-syntax'
18+
- '**/syntax_test_*'
19+
- '**.tmPreferences'
20+
workflow_dispatch:
21+
22+
jobs:
23+
syntax_tests:
24+
name: Sublime Text ${{ matrix.build }}
25+
runs-on: ubuntu-latest
26+
timeout-minutes: 15 # default is 6 hours!
27+
strategy:
28+
fail-fast: false
29+
matrix:
30+
include:
31+
# Stable ST4 builds
32+
- build: 4152
33+
default_packages: v4152
34+
- build: 4169
35+
default_packages: v4169
36+
- build: 4180
37+
default_packages: v4180
38+
- build: 4192
39+
default_packages: v4192
40+
# Latest dev build
41+
- build: latest
42+
default_packages: master
43+
steps:
44+
- name: Checkout Default Packages
45+
uses: actions/checkout@v4
46+
with:
47+
repository: sublimehq/Packages
48+
ref: ${{ matrix.default_packages }}
49+
path: st_syntax_tests/Data/Packages
50+
51+
- name: Delete default package tests
52+
run: |
53+
find st_syntax_tests/Data/Packages/*/ -type f -name 'syntax_test*' -exec rm -v '{}' \;
54+
55+
- name: Checkout Datastar
56+
uses: actions/checkout@v4
57+
with:
58+
path: st_syntax_tests/Data/Packages/Datastar
59+
60+
- name: Run Syntax Tests for Sublime Text ${{ matrix.build }}
61+
run: |
62+
if [[ "${{ matrix.build }}" == "latest" ]]; then
63+
wget -O st_syntax_tests.tar.xz https://download.sublimetext.com/latest/dev/linux/x64/syntax_tests
64+
else
65+
wget -O st_syntax_tests.tar.xz https://download.sublimetext.com/st_syntax_tests_build_${{ matrix.build }}_x64.tar.xz
66+
fi
67+
tar xf st_syntax_tests.tar.xz
68+
cd st_syntax_tests
69+
./syntax_tests

.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# MacOS specific ignores
2+
.DS_Store
3+
4+
# development
5+
.sublime/
6+
.venv/
7+
.vscode/
8+
*.sublime-project
9+
*.sublime-workspace
10+
11+
# python cache files
12+
__pycache__/
13+
*.pyc

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.8
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
"scope": "meta.embedded.datastar support.function",
3+
"completions": [
4+
{
5+
"trigger": "@get",
6+
"annotation": "Datastar",
7+
"kind": ["function", "f", "Action"],
8+
"details": "Sends a GET request to the backend and merges the response.",
9+
},
10+
{
11+
"trigger": "@post",
12+
"annotation": "Datastar",
13+
"kind": ["function", "f", "Action"],
14+
"details": "Sends a POST request to the backend and merges the response.",
15+
},
16+
{
17+
"trigger": "@put",
18+
"annotation": "Datastar",
19+
"kind": ["function", "f", "Action"],
20+
"details": "Sends a PUT request to the backend and merges the response.",
21+
},
22+
{
23+
"trigger": "@patch",
24+
"annotation": "Datastar",
25+
"kind": ["function", "f", "Action"],
26+
"details": "Sends a PATCH request to the backend and merges the response.",
27+
},
28+
{
29+
"trigger": "@delete",
30+
"annotation": "Datastar",
31+
"kind": ["function", "f", "Action"],
32+
"details": "Sends a DELETE request to the backend and merges the response.",
33+
},
34+
{
35+
"trigger": "@clipboard",
36+
"annotation": "Datastar",
37+
"kind": ["function", "f", "Action"],
38+
"details": "Copies the provided evaluated expression to the clipboard.",
39+
},
40+
{
41+
"trigger": "@setAll",
42+
"annotation": "Datastar",
43+
"kind": ["function", "f", "Action"],
44+
"details": "Sets all matching signals to a provided value.",
45+
},
46+
{
47+
"trigger": "@toggleAll",
48+
"annotation": "Datastar",
49+
"kind": ["function", "f", "Action"],
50+
"details": "Toggles all matching signal values.",
51+
},
52+
{
53+
"trigger": "@fit",
54+
"annotation": "Datastar",
55+
"kind": ["function", "f", "Action"],
56+
"details": "Makes a value linearly interpolate.",
57+
},
58+
],
59+
}
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
{
2+
"scope": "meta.embedded.datastar - meta.embedded.datastar support.function",
3+
"completions": [
4+
{
5+
"trigger": "@get()",
6+
"contents": "@get($1)",
7+
"annotation": "Datastar",
8+
"kind": ["function", "f", "Action"],
9+
"details": "Sends a GET request to the backend and merges the response.",
10+
},
11+
{
12+
"trigger": "@post()",
13+
"contents": "@post($1)",
14+
"annotation": "Datastar",
15+
"kind": ["function", "f", "Action"],
16+
"details": "Sends a POST request to the backend and merges the response.",
17+
},
18+
{
19+
"trigger": "@put()",
20+
"contents": "@put($1)",
21+
"annotation": "Datastar",
22+
"kind": ["function", "f", "Action"],
23+
"details": "Sends a PUT request to the backend and merges the response.",
24+
},
25+
{
26+
"trigger": "@patch()",
27+
"contents": "@patch($1)",
28+
"annotation": "Datastar",
29+
"kind": ["function", "f", "Action"],
30+
"details": "Sends a PATCH request to the backend and merges the response.",
31+
},
32+
{
33+
"trigger": "@delete()",
34+
"contents": "@delete($1)",
35+
"annotation": "Datastar",
36+
"kind": ["function", "f", "Action"],
37+
"details": "Sends a DELETE request to the backend and merges the response.",
38+
},
39+
{
40+
"trigger": "@clipboard()",
41+
"contents": "@clipboard($1)",
42+
"annotation": "Datastar",
43+
"kind": ["function", "f", "Action"],
44+
"details": "Copies the provided evaluated expression to the clipboard.",
45+
},
46+
{
47+
"trigger": "@setAll()",
48+
"contents": "@setAll($1)",
49+
"annotation": "Datastar",
50+
"kind": ["function", "f", "Action"],
51+
"details": "Sets all matching signals to a provided value.",
52+
},
53+
{
54+
"trigger": "@toggleAll()",
55+
"contents": "@toggleAll($1)",
56+
"annotation": "Datastar",
57+
"kind": ["function", "f", "Action"],
58+
"details": "Toggles all matching signal values.",
59+
},
60+
{
61+
"trigger": "@fit()",
62+
"contents": "@fit($1)",
63+
"annotation": "Datastar",
64+
"kind": ["function", "f", "Action"],
65+
"details": "Makes a value linearly interpolate.",
66+
},
67+
],
68+
}

0 commit comments

Comments
 (0)