{
  "schema": 1,
  "id": "ext.dart",
  "name": "Dart",
  "version": "1.0.1",
  "category": "language",
  "description": "Dart with raw/multiline strings, null-safety keywords, a dart run runner, analysis server and pub projects with tasks and template.",
  "author": "Lumen",
  "icon": "Dt",
  "color": "#00b4ab",
  "license": "MIT",
  "minAppVersion": "0.5.0",
  "keywords": [
    "dart",
    "pub",
    "pubspec"
  ],
  "readme": "",
  "settings": [],
  "pages": [],
  "agents": [],
  "views": [],
  "commands": [],
  "addon": {
    "schema": 1,
    "languages": [
      {
        "id": "dart",
        "name": "Dart",
        "extensions": [
          ".dart"
        ],
        "icon": "Dt",
        "color": "#00b4ab",
        "capitalizedAsType": true,
        "comments": {
          "line": "//",
          "block": [
            "/*",
            "*/"
          ]
        },
        "controls": [
          "if",
          "else",
          "for",
          "while",
          "do",
          "switch",
          "case",
          "default",
          "break",
          "continue",
          "return",
          "throw",
          "try",
          "catch",
          "finally",
          "rethrow",
          "assert",
          "await",
          "yield"
        ],
        "keywords": [
          "abstract",
          "as",
          "async",
          "base",
          "class",
          "const",
          "covariant",
          "deferred",
          "dynamic",
          "enum",
          "export",
          "extends",
          "extension",
          "external",
          "factory",
          "final",
          "get",
          "hide",
          "implements",
          "import",
          "in",
          "interface",
          "is",
          "late",
          "library",
          "mixin",
          "new",
          "on",
          "operator",
          "part",
          "required",
          "sealed",
          "set",
          "show",
          "static",
          "super",
          "sync",
          "this",
          "typedef",
          "var",
          "void",
          "when",
          "with"
        ],
        "types": [
          "int",
          "double",
          "num",
          "bool",
          "String",
          "List",
          "Map",
          "Set",
          "Iterable",
          "Iterator",
          "Object",
          "Never",
          "Future",
          "Stream",
          "Record",
          "Function",
          "Type",
          "Symbol",
          "Duration",
          "DateTime",
          "Uri",
          "RegExp",
          "StringBuffer",
          "Exception",
          "Error",
          "Comparable",
          "Completer",
          "Enum"
        ],
        "builtins": [
          "print",
          "main",
          "identical",
          "runApp"
        ],
        "constants": [
          "true",
          "false",
          "null",
          "this",
          "super"
        ],
        "strings": [
          {
            "start": "'''",
            "end": "'''",
            "multiline": true,
            "escapes": true
          },
          {
            "start": "\"\"\"",
            "end": "\"\"\"",
            "multiline": true,
            "escapes": true
          },
          {
            "start": "r'",
            "end": "'",
            "escapes": false
          },
          {
            "start": "r\"",
            "end": "\"",
            "escapes": false
          },
          {
            "start": "'",
            "escapes": true
          },
          {
            "start": "\"",
            "escapes": true
          }
        ],
        "meta": "^@[A-Za-z]\\w*",
        "indentUnit": 2,
        "snippets": [
          {
            "label": "main",
            "detail": "main",
            "body": "void main() {\n  $0\n}"
          },
          {
            "label": "class",
            "detail": "Klasse",
            "body": "class ${Name} {\n  ${Name}(this.${feld});\n\n  final ${String} ${feld};$0\n}"
          },
          {
            "label": "enum",
            "detail": "Enum",
            "body": "enum ${Name} {\n  ${one},\n  ${two};$0\n}"
          },
          {
            "label": "mixin",
            "detail": "Mixin",
            "body": "mixin ${Name} {\n  $0\n}"
          },
          {
            "label": "ext",
            "detail": "Extension",
            "body": "extension ${Name} on ${String} {\n  $0\n}"
          },
          {
            "label": "sealed",
            "detail": "Sealed Class",
            "body": "sealed class ${Name} {}\n\nfinal class ${A} extends ${Name} {\n  ${A}(this.${wert});\n\n  final ${String} ${wert};\n}$0"
          },
          {
            "label": "switch",
            "detail": "switch-Ausdruck",
            "body": "switch (${wert}) {\n  ${1} => $0,\n  _ => ${null},\n}"
          },
          {
            "label": "async",
            "detail": "async-Funktion",
            "body": "Future<${void}> ${name}() async {\n  $0\n}"
          },
          {
            "label": "stream",
            "detail": "async*-Generator",
            "body": "Stream<${int}> ${name}() async* {\n  yield $0;\n}"
          },
          {
            "label": "try",
            "detail": "try/catch",
            "body": "try {\n  $0\n} on ${Exception} catch (e) {\n  print(e);\n}"
          },
          {
            "label": "for",
            "detail": "for-in",
            "body": "for (final ${e} in ${liste}) {\n  $0\n}"
          },
          {
            "label": "test",
            "detail": "Test",
            "body": "test('${sollte etwas tun}', () {\n  $0\n});"
          },
          {
            "label": "group",
            "detail": "Test-Gruppe",
            "body": "group('${Name}', () {\n  $0\n});"
          }
        ],
        "run": [
          {
            "label": "dart run",
            "command": "dart",
            "args": [
              "run",
              "${file}"
            ]
          },
          {
            "label": "dart compile exe",
            "command": "dart",
            "args": [
              "compile",
              "exe",
              "${file}",
              "-o",
              "${fileStem}"
            ],
            "then": {
              "command": "./${fileStem}",
              "args": []
            }
          },
          {
            "label": "dart test",
            "command": "dart",
            "args": [
              "test"
            ]
          }
        ],
        "lsp": [
          {
            "label": "Dart Analysis Server",
            "command": "dart",
            "args": [
              "language-server",
              "--protocol=lsp"
            ],
            "candidates": [
              "~/flutter/bin/dart",
              "~/development/flutter/bin/dart",
              "~/.pub-cache/bin/dart",
              "/usr/lib/dart/bin/dart",
              "/opt/homebrew/bin/dart",
              "/usr/local/bin/dart"
            ],
            "languageId": "dart",
            "rootMarkers": [
              "pubspec.yaml",
              ".git"
            ],
            "settings": {
              "dart": {
                "completeFunctionCalls": true,
                "enableSnippets": true,
                "showTodos": true
              }
            },
            "install": "Dart SDK installieren (Arch: yay -S dart · macOS: brew install dart · sonst https://dart.dev/get-dart) — der Server steckt im SDK",
            "systemPackages": {
              "brew": "dart"
            },
            "installCommands": {
              "darwin": "brew tap dart-lang/dart && brew install dart"
            },
            "docs": "https://dart.dev/tools/dart-language-server",
            "rootSearch": "outermost"
          }
        ]
      }
    ],
    "themes": [],
    "commands": [],
    "events": [],
    "templates": [
      {
        "id": "dart-package",
        "name": "Dart (Konsole / Paket)",
        "description": "Dart console program or reusable package with tests.",
        "languageId": "dart",
        "kindId": "dart",
        "icon": "Dt",
        "color": "#00b4ab",
        "fields": [
          {
            "id": "description",
            "label": "templates.fields.description",
            "placeholder": "templates.fields.descriptionPlaceholder",
            "required": false,
            "section": "templates.sections.project"
          },
          {
            "id": "sdk",
            "label": "Dart SDK",
            "type": "select",
            "section": "templates.sections.build",
            "choices": [
              {
                "value": "^3.8.0",
                "label": "3.8.0"
              },
              {
                "value": "^3.7.0",
                "label": "3.7.0"
              },
              {
                "value": "^3.6.0",
                "label": "3.6.0"
              }
            ]
          },
          {
            "id": "type",
            "label": "templates.fields.type",
            "type": "select",
            "section": "templates.sections.build",
            "choices": [
              {
                "value": "cmd",
                "label": "Konsole"
              },
              {
                "value": "lib",
                "label": "templates.fields.library"
              }
            ]
          }
        ],
        "open": "{{#if type=lib}}lib/{{slug|snake}}.dart{{/if}}{{#unless type=lib}}bin/{{slug|snake}}.dart{{/unless}}",
        "setup": [
          {
            "label": "dart pub get",
            "command": "dart",
            "args": [
              "pub",
              "get"
            ]
          }
        ],
        "files": [
          {
            "path": "pubspec.yaml",
            "content": "name: {{slug|snake}}\ndescription: {{description}}\nversion: 0.1.0\n\nenvironment:\n  sdk: {{sdk}}\n\ndev_dependencies:\n  lints: ^5.0.0\n  test: ^1.25.0\n"
          },
          {
            "path": "analysis_options.yaml",
            "content": "include: package:lints/recommended.yaml\n"
          },
          {
            "path": "lib/{{slug|snake}}.dart",
            "content": "/// {{description}}\nlibrary;\n\nint add(int a, int b) => a + b;\n"
          },
          {
            "path": "bin/{{slug|snake}}.dart",
            "when": {
              "field": "type",
              "notEquals": "lib"
            },
            "content": "import 'package:{{slug|snake}}/{{slug|snake}}.dart';\n\nvoid main(List<String> arguments) {\n  print('2 + 3 = ${add(2, 3)}');\n}\n"
          },
          {
            "path": "test/{{slug|snake}}_test.dart",
            "content": "import 'package:{{slug|snake}}/{{slug|snake}}.dart';\nimport 'package:test/test.dart';\n\nvoid main() {\n  test('add', () {\n    expect(add(2, 3), 5);\n  });\n}\n"
          },
          {
            "path": "README.md",
            "content": "# {{name}}\n\n```bash\ndart pub get\ndart run\ndart test\n```\n"
          },
          {
            "path": ".gitignore",
            "content": ".dart_tool/\n.packages\nbuild/\npubspec.lock\n.lumen/\n"
          }
        ]
      }
    ],
    "projectKinds": [
      {
        "id": "dart",
        "name": "Dart",
        "icon": "Dt",
        "color": "#00b4ab",
        "markers": [
          "pubspec.yaml"
        ],
        "priority": 10,
        "languageIds": [
          "dart"
        ],
        "dependencies": {
          "manager": "pub",
          "placeholder": "http",
          "hint": "pub.dev",
          "command": "dart",
          "args": [
            "add",
            "{spec}"
          ],
          "label": "dart add {name}",
          "id": "dart:add"
        },
        "tasks": [
          {
            "id": "run",
            "label": "templates.tasks.run",
            "command": "dart",
            "args": [
              "run"
            ],
            "group": "run",
            "forEachDir": {
              "dir": "bin",
              "label": "templates.tasks.runTarget",
              "args": [
                "run",
                "bin/{dir}"
              ],
              "limit": 4
            }
          },
          {
            "id": "build",
            "label": "templates.tasks.build",
            "command": "dart",
            "args": [
              "compile",
              "exe",
              "bin/main.dart",
              "-o",
              "build/app"
            ],
            "group": "build"
          },
          {
            "id": "pub-get",
            "label": "dart pub get",
            "command": "dart",
            "args": [
              "pub",
              "get"
            ],
            "group": "build"
          },
          {
            "id": "test",
            "label": "templates.tasks.tests",
            "command": "dart",
            "args": [
              "test"
            ],
            "group": "test"
          },
          {
            "id": "analyze",
            "label": "dart analyze",
            "command": "dart",
            "args": [
              "analyze"
            ],
            "group": "test"
          },
          {
            "id": "format",
            "label": "dart format",
            "command": "dart",
            "args": [
              "format",
              "."
            ],
            "group": "other"
          },
          {
            "id": "upgrade",
            "label": "templates.tasks.updateDeps",
            "command": "dart",
            "args": [
              "pub",
              "upgrade"
            ],
            "group": "other"
          }
        ],
        "facts": [
          {
            "label": "Paket",
            "file": "pubspec.yaml",
            "pattern": "^name:\\s*(\\S+)",
            "role": "name"
          },
          {
            "label": "Version",
            "file": "pubspec.yaml",
            "pattern": "^version:\\s*(\\S+)"
          },
          {
            "label": "SDK",
            "file": "pubspec.yaml",
            "pattern": "^\\s+sdk:\\s*['\"]?([^'\"\\n]+)"
          }
        ],
        "buildFile": "pubspec.yaml",
        "dependencyScan": [
          {
            "file": "pubspec.yaml",
            "section": "dependencies",
            "pattern": "^\\s{2}([a-z_][\\w]*):\\s*[\\^<>=~]*([\\d][^\\s#]*)?"
          },
          {
            "file": "pubspec.yaml",
            "section": "dev_dependencies",
            "pattern": "^\\s{2}([a-z_][\\w]*):\\s*[\\^<>=~]*([\\d][^\\s#]*)?",
            "scope": "dev"
          }
        ],
        "sourceRoots": [
          "lib",
          "bin",
          "test"
        ]
      }
    ],
    "snippets": [],
    "id": "ext.dart",
    "name": "Dart",
    "version": "1.0.1",
    "description": "Dart with raw/multiline strings, null-safety keywords, a dart run runner, analysis server and pub projects with tasks and template.",
    "author": "Lumen",
    "icon": "Dt",
    "color": "#00b4ab",
    "category": "language"
  }
}
