Skip to content

Commit bcb5d3b

Browse files
author
Benjamin Kott
committed
[TASK] Initialize repository and add first working draft
0 parents  commit bcb5d3b

9 files changed

Lines changed: 219 additions & 0 deletions

File tree

.editorconfig

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# EditorConfig is awesome: http://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Unix-style newlines with a newline ending every file
7+
[*]
8+
charset = utf-8
9+
end_of_line = lf
10+
insert_final_newline = true
11+
trim_trailing_whitespace = true
12+
13+
# JSON-Files
14+
[*.json]
15+
indent_style = space
16+
indent_size = 4
17+
18+
# MD-Files
19+
[*.md]
20+
indent_style = space
21+
indent_size = 4

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Enforce checkout with linux lf consistent over all plattforms
2+
*.md text eol=lf
3+
*.json text eol=lf

.vscode/launch.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// A launch configuration that launches the extension inside a new window
2+
{
3+
"version": "0.1.0",
4+
"configurations": [
5+
{
6+
"name": "Launch Extension",
7+
"type": "extensionHost",
8+
"request": "launch",
9+
"runtimeExecutable": "${execPath}",
10+
"args": ["--extensionDevelopmentPath=${workspaceRoot}" ]
11+
}
12+
]
13+
}

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2017 Benjamin Kott
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# vscode-typo3-typoscript
2+
An extension for VS Code which provides support for the TypoScript syntax.

language-configuration.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"comments": {
3+
"lineComment": "//", // "#"
4+
"blockComment": [ "/*", "*/" ]
5+
},
6+
"brackets": [
7+
["{", "}"],
8+
["[", "]"],
9+
["(", ")"]
10+
],
11+
"autoClosingPairs": [
12+
{ "open": "{", "close": "}", "notIn": ["string"] },
13+
{ "open": "[", "close": "]", "notIn": ["string"] },
14+
{ "open": "(", "close": ")", "notIn": ["string"] },
15+
{ "open": "'", "close": "'", "notIn": ["string"] },
16+
{ "open": "\"", "close": "\"", "notIn": ["string", "comment"] }
17+
]
18+
}

media/icon.jpg

2.57 KB
Loading

package.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"name": "typo3-typoscript",
3+
"displayName": "TYPO3 TypoScript",
4+
"description": "Syntax highlighting for TYPO3 TypoScript",
5+
"version": "0.0.1",
6+
"publisher": "benjaminkott",
7+
"icon": "media/icon.jpg",
8+
"engines": {
9+
"vscode": "^1.15.0"
10+
},
11+
"license": "MIT",
12+
"categories": [
13+
"Languages"
14+
],
15+
"keywords": [
16+
"typoscript",
17+
"typo3",
18+
"template"
19+
],
20+
"contributes": {
21+
"languages": [
22+
{
23+
"id": "typoscript",
24+
"aliases": [
25+
"TypoScript",
26+
"typoscript"
27+
],
28+
"extensions": [
29+
".typoscript"
30+
],
31+
"configuration": "./language-configuration.json"
32+
}
33+
],
34+
"grammars": [
35+
{
36+
"language": "typoscript",
37+
"scopeName": "source.typoscript",
38+
"path": "./syntaxes/typoscript.tmLanguage.json"
39+
}
40+
]
41+
}
42+
}
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
3+
"name": "TypoScript",
4+
"patterns": [
5+
{
6+
"include": "#comments"
7+
},
8+
{
9+
"comment": "Everything after the equal sign",
10+
"begin": "=",
11+
"captures": {
12+
"0": {
13+
"name": "keyword.operator"
14+
}
15+
},
16+
"end": "($)",
17+
"name": "string.interpolated.typoscript",
18+
"patterns": [
19+
{
20+
"include": "#cobjects"
21+
},
22+
{
23+
"include": "#constants"
24+
}
25+
]
26+
}
27+
],
28+
"repository": {
29+
"comments": {
30+
"patterns": [
31+
{
32+
"begin": "/\\*",
33+
"captures": {
34+
"0": {
35+
"name": "punctuation.definition.comment.typoscript"
36+
}
37+
},
38+
"end": "\\*/",
39+
"name": "comment.block.typoscript"
40+
},
41+
{
42+
"begin": "(^\\s+)?(?=//)",
43+
"beginCaptures": {
44+
"1": {
45+
"name": "punctuation.whitespace.comment.leading.typoscript"
46+
}
47+
},
48+
"end": "(?!\\G)",
49+
"patterns": [
50+
{
51+
"begin": "//",
52+
"beginCaptures": {
53+
"0": {
54+
"name": "punctuation.definition.comment.typoscript"
55+
}
56+
},
57+
"end": "\\n|(?=\\?>)",
58+
"name": "comment.line.double-slash.typoscript"
59+
}
60+
]
61+
},
62+
{
63+
"begin": "(^\\s+)?(?=#)",
64+
"beginCaptures": {
65+
"1": {
66+
"name": "punctuation.whitespace.comment.leading.typoscript"
67+
}
68+
},
69+
"end": "(?!\\G)",
70+
"patterns": [
71+
{
72+
"begin": "#",
73+
"beginCaptures": {
74+
"0": {
75+
"name": "punctuation.definition.comment.typoscript"
76+
}
77+
},
78+
"end": "\\n|(?=\\?>)",
79+
"name": "comment.line.number-sign.typoscript"
80+
}
81+
]
82+
}
83+
]
84+
},
85+
"constants": {
86+
"patterns": [{
87+
"name": "variable.other.typoscript",
88+
"match": "{\\$.*}"
89+
}]
90+
},
91+
"cobjects": {
92+
"patterns": [{
93+
"name": "support.class.cobject.typoscript",
94+
"match": "(CASE|COA|COA_INT|CONTENT|EDITPANEL|FILE|FILES|FLUIDTEMPLATE|HMENU|IMAGE|IMG_RESOURCE|LOAD_REGISTER|RECORDS|RESTORE_REGISTER|SVG|TEMPLATE|TEXT|USER|USER_INT)\\b"
95+
}]
96+
}
97+
},
98+
"scopeName": "source.typoscript"
99+
}

0 commit comments

Comments
 (0)