Skip to content

Commit

Permalink
[TASK] Initialize repository and add first working draft
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Kott committed Aug 13, 2017
0 parents commit bcb5d3b
Show file tree
Hide file tree
Showing 9 changed files with 219 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# EditorConfig is awesome: http://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

# JSON-Files
[*.json]
indent_style = space
indent_size = 4

# MD-Files
[*.md]
indent_style = space
indent_size = 4
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Enforce checkout with linux lf consistent over all plattforms
*.md text eol=lf
*.json text eol=lf
13 changes: 13 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// A launch configuration that launches the extension inside a new window
{
"version": "0.1.0",
"configurations": [
{
"name": "Launch Extension",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceRoot}" ]
}
]
}
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2017 Benjamin Kott

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# vscode-typo3-typoscript
An extension for VS Code which provides support for the TypoScript syntax.
18 changes: 18 additions & 0 deletions language-configuration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"comments": {
"lineComment": "//", // "#"
"blockComment": [ "/*", "*/" ]
},
"brackets": [
["{", "}"],
["[", "]"],
["(", ")"]
],
"autoClosingPairs": [
{ "open": "{", "close": "}", "notIn": ["string"] },
{ "open": "[", "close": "]", "notIn": ["string"] },
{ "open": "(", "close": ")", "notIn": ["string"] },
{ "open": "'", "close": "'", "notIn": ["string"] },
{ "open": "\"", "close": "\"", "notIn": ["string", "comment"] }
]
}
Binary file added media/icon.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 42 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"name": "typo3-typoscript",
"displayName": "TYPO3 TypoScript",
"description": "Syntax highlighting for TYPO3 TypoScript",
"version": "0.0.1",
"publisher": "benjaminkott",
"icon": "media/icon.jpg",
"engines": {
"vscode": "^1.15.0"
},
"license": "MIT",
"categories": [
"Languages"
],
"keywords": [
"typoscript",
"typo3",
"template"
],
"contributes": {
"languages": [
{
"id": "typoscript",
"aliases": [
"TypoScript",
"typoscript"
],
"extensions": [
".typoscript"
],
"configuration": "./language-configuration.json"
}
],
"grammars": [
{
"language": "typoscript",
"scopeName": "source.typoscript",
"path": "./syntaxes/typoscript.tmLanguage.json"
}
]
}
}
99 changes: 99 additions & 0 deletions syntaxes/typoscript.tmLanguage.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
{
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
"name": "TypoScript",
"patterns": [
{
"include": "#comments"
},
{
"comment": "Everything after the equal sign",
"begin": "=",
"captures": {
"0": {
"name": "keyword.operator"
}
},
"end": "($)",
"name": "string.interpolated.typoscript",
"patterns": [
{
"include": "#cobjects"
},
{
"include": "#constants"
}
]
}
],
"repository": {
"comments": {
"patterns": [
{
"begin": "/\\*",
"captures": {
"0": {
"name": "punctuation.definition.comment.typoscript"
}
},
"end": "\\*/",
"name": "comment.block.typoscript"
},
{
"begin": "(^\\s+)?(?=//)",
"beginCaptures": {
"1": {
"name": "punctuation.whitespace.comment.leading.typoscript"
}
},
"end": "(?!\\G)",
"patterns": [
{
"begin": "//",
"beginCaptures": {
"0": {
"name": "punctuation.definition.comment.typoscript"
}
},
"end": "\\n|(?=\\?>)",
"name": "comment.line.double-slash.typoscript"
}
]
},
{
"begin": "(^\\s+)?(?=#)",
"beginCaptures": {
"1": {
"name": "punctuation.whitespace.comment.leading.typoscript"
}
},
"end": "(?!\\G)",
"patterns": [
{
"begin": "#",
"beginCaptures": {
"0": {
"name": "punctuation.definition.comment.typoscript"
}
},
"end": "\\n|(?=\\?>)",
"name": "comment.line.number-sign.typoscript"
}
]
}
]
},
"constants": {
"patterns": [{
"name": "variable.other.typoscript",
"match": "{\\$.*}"
}]
},
"cobjects": {
"patterns": [{
"name": "support.class.cobject.typoscript",
"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"
}]
}
},
"scopeName": "source.typoscript"
}

0 comments on commit bcb5d3b

Please sign in to comment.