├── .vscode └── launch.json ├── .vscodeignore ├── CHANGELOG.md ├── LICENSE ├── README.md ├── images ├── logo.png └── ss1.png ├── language-configuration.json ├── package.json ├── pyscript-0.1.0.vsix ├── pyscript-0.1.1.vsix ├── snippets ├── pyscript-snippets.json └── test.json ├── syntaxes ├── pyscript.tmLanguage.json └── python.tmLanguage.json └── vsc-extension-quickstart.md /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | // A launch configuration that launches the extension inside a new window 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | { 6 | "version": "0.2.0", 7 | "configurations": [ 8 | { 9 | "name": "Extension", 10 | "type": "extensionHost", 11 | "request": "launch", 12 | "args": [ 13 | "--extensionDevelopmentPath=${workspaceFolder}" 14 | ] 15 | } 16 | ] 17 | } -------------------------------------------------------------------------------- /.vscodeignore: -------------------------------------------------------------------------------- 1 | .vscode/** 2 | .vscode-test/** 3 | .gitignore 4 | vsc-extension-quickstart.md 5 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | All notable changes to the "pyscript" extension will be documented in this file. 4 | 5 | Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file. 6 | 7 | ## [Unreleased] 8 | 9 | - Initial release -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2021 vscode-pyscript contributors 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the "Software"), 7 | to deal in the Software without restriction, including without limitation 8 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 9 | and/or sell copies of the Software, and to permit persons to whom the 10 | Software is furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included 13 | in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | OR 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 20 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21 | IN THE SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # PyScript extension for Visual Studio Code 2 | 3 | > Beautiful syntax and scoped snippets for pyscript 4 | 5 | ![Syntax with PyScript](images/ss1.png) 6 | 7 | 8 | ## Features 9 | - Provides code Highlighting for python langage in pyscript in HTML files. 10 | - More than 200 snippets for PyScript, Django Templte, Python and HTML. 11 | - Snippets are scoped to the current file. 12 | - New Language Support for `pyscript` in VS code Language selection. 13 | 14 | 15 | ## Example Snippets 16 | `pyscript` will add the following snippets: 17 | ``` 18 | 19 | 20 | ``` 21 | 22 | `pycdn` will add the following snippets: 23 | ``` 24 | 25 | " 26 | ``` 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hardeepsingh980/pyscript/1e6ef04e44d847e9f5c81ba2fa355bcbb7a4cb5f/images/logo.png -------------------------------------------------------------------------------- /images/ss1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hardeepsingh980/pyscript/1e6ef04e44d847e9f5c81ba2fa355bcbb7a4cb5f/images/ss1.png -------------------------------------------------------------------------------- /language-configuration.json: -------------------------------------------------------------------------------- 1 | { 2 | "comments": { 3 | // symbol used for single line comment. Remove this entry if your language does not support line comments 4 | "lineComment": "//", 5 | // symbols used for start and end a block comment. Remove this entry if your language does not support block comments 6 | "blockComment": [ "/*", "*/" ] 7 | }, 8 | // symbols used as brackets 9 | "brackets": [ 10 | ["{", "}"], 11 | ["[", "]"], 12 | ["(", ")"] 13 | ], 14 | // symbols that are auto closed when typing 15 | "autoClosingPairs": [ 16 | ["{", "}"], 17 | ["[", "]"], 18 | ["(", ")"], 19 | ["\"", "\""], 20 | ["'", "'"] 21 | ], 22 | // symbols that can be used to surround a selection 23 | "surroundingPairs": [ 24 | ["{", "}"], 25 | ["[", "]"], 26 | ["(", ")"], 27 | ["\"", "\""], 28 | ["'", "'"] 29 | ] 30 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pyscript", 3 | "displayName": "pyscript", 4 | "description": "Code Highlighter for PyScript", 5 | "publisher": "HardeepSingh", 6 | "icon": "images/logo.png", 7 | "galleryBanner": { 8 | "color": "#0c4b33", 9 | "theme": "dark" 10 | }, 11 | "version": "0.1.1", 12 | "engines": { 13 | "vscode": "^1.67.0" 14 | }, 15 | "recommendations": [ 16 | "ms-python.python" 17 | ], 18 | "keywords": [ 19 | "python", 20 | "django", 21 | "web", 22 | "pyscript", 23 | "django templates", 24 | "anaconda" 25 | ], 26 | "categories": [ 27 | "Programming Languages", 28 | "Snippets" 29 | ], 30 | "repository": { 31 | "type": "git", 32 | "url": "https://github.com/Hardeepsingh980/pyscript.git" 33 | }, 34 | "homepage": "https://github.com/Hardeepsingh980/pyscript.git", 35 | "bugs": { 36 | "url": "https://github.com/Hardeepsingh980/pyscript.git/issues" 37 | }, 38 | "contributes": { 39 | "languages": [{ 40 | "id": "pyscript", 41 | "aliases": ["pyscript", "pyscript"], 42 | "extensions": [".html"], 43 | "configuration": "./language-configuration.json" 44 | }], 45 | "grammars": [{ 46 | "language": "pyscript", 47 | "scopeName": "text.html.pyscript", 48 | "path": "./syntaxes/pyscript.tmLanguage.json" 49 | }], 50 | "snippets": [ 51 | { 52 | "language": "pyscript", 53 | "scopeName": "text.html.pyscript", 54 | "path": "./snippets/pyscript-snippets.json" 55 | } 56 | ] 57 | } 58 | } -------------------------------------------------------------------------------- /pyscript-0.1.0.vsix: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hardeepsingh980/pyscript/1e6ef04e44d847e9f5c81ba2fa355bcbb7a4cb5f/pyscript-0.1.0.vsix -------------------------------------------------------------------------------- /pyscript-0.1.1.vsix: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Hardeepsingh980/pyscript/1e6ef04e44d847e9f5c81ba2fa355bcbb7a4cb5f/pyscript-0.1.1.vsix -------------------------------------------------------------------------------- /snippets/pyscript-snippets.json: -------------------------------------------------------------------------------- 1 | { 2 | "pyscript": { 3 | "prefix": "pyscript", 4 | "description": "Python script", 5 | "body": [ 6 | "", 7 | "$1", 8 | "" 9 | ] 10 | }, 11 | "pycdn": { 12 | "prefix": "pycdn", 13 | "description": "add pyscript's CDN", 14 | "body": [ 15 | "", 16 | "" 17 | ] 18 | }, 19 | "doctype": { 20 | "prefix": "doctype", 21 | "body": [ 22 | "", 23 | "$1" 24 | ], 25 | "description": "HTML - Defines the document type", 26 | "scope": "text.html" 27 | }, 28 | "a": { 29 | "prefix": "a", 30 | "body": "$2$3", 31 | "description": "HTML - Defines a hyperlink", 32 | "scope": "text.html" 33 | }, 34 | "abbr": { 35 | "prefix": "abbr", 36 | "body": "$2$3", 37 | "description": "HTML - Defines an abbreviation", 38 | "scope": "text.html" 39 | }, 40 | "address": { 41 | "prefix": "address", 42 | "body": [ 43 | "
", 44 | "$1", 45 | "
" 46 | ], 47 | "description": "HTML - Defines an address element", 48 | "scope": "text.html" 49 | }, 50 | "area": { 51 | "prefix": "area", 52 | "body": "\"$4\"$5", 53 | "description": "HTML - Defines an area inside an image map", 54 | "scope": "text.html" 55 | }, 56 | "article": { 57 | "prefix": "article", 58 | "body": [ 59 | "
", 60 | "\t$1", 61 | "
" 62 | ], 63 | "description": "HTML - Defines an article", 64 | "scope": "text.html" 65 | }, 66 | "aside": { 67 | "prefix": "aside", 68 | "body": [ 69 | "$2" 72 | ], 73 | "description": "HTML - Defines content aside from the page content", 74 | "scope": "text.html" 75 | }, 76 | "audio": { 77 | "prefix": "audio", 78 | "body": [ 79 | "" 82 | ], 83 | "description": "HTML - Defines sounds content", 84 | "scope": "text.html" 85 | }, 86 | "b": { 87 | "prefix": "b", 88 | "body": "$1$2", 89 | "description": "HTML - Defines bold text", 90 | "scope": "text.html" 91 | }, 92 | "base": { 93 | "prefix": "base", 94 | "body": "$3", 95 | "description": "HTML - Defines a base URL for all the links in a page", 96 | "scope": "text.html" 97 | }, 98 | "bdi": { 99 | "prefix": "bdi", 100 | "body": "$1$2", 101 | "description": "HTML - Used to isolate text that is of unknown directionality", 102 | "scope": "text.html" 103 | }, 104 | "bdo": { 105 | "prefix": "bdo", 106 | "body": [ 107 | "", 108 | "$2", 109 | "" 110 | ], 111 | "description": "HTML - Defines the direction of text display", 112 | "scope": "text.html" 113 | }, 114 | "big": { 115 | "prefix": "big", 116 | "body": "$1$2", 117 | "description": "HTML - Used to make text bigger", 118 | "scope": "text.html" 119 | }, 120 | "blockquote": { 121 | "prefix": "blockquote", 122 | "body": [ 123 | "
", 124 | "\t$1", 125 | "
" 126 | ], 127 | "description": "HTML - Defines a long quotation", 128 | "scope": "text.html" 129 | }, 130 | "body": { 131 | "prefix": "body", 132 | "body": [ 133 | "", 134 | "\t$1", 135 | "" 136 | ], 137 | "description": "HTML - Defines the body element", 138 | "scope": "text.html" 139 | }, 140 | "br": { 141 | "prefix": "br", 142 | "body": "
", 143 | "description": "HTML - Inserts a single line break", 144 | "scope": "text.html" 145 | }, 146 | "button": { 147 | "prefix": "button", 148 | "body": "$3", 149 | "description": "HTML - Defines a push button", 150 | "scope": "text.html" 151 | }, 152 | "canvas": { 153 | "prefix": "canvas", 154 | "body": "$2$3", 155 | "description": "HTML - Defines graphics", 156 | "scope": "text.html" 157 | }, 158 | "caption": { 159 | "prefix": "caption", 160 | "body": "$1$2", 161 | "description": "HTML - Defines a table caption", 162 | "scope": "text.html" 163 | }, 164 | "cite": { 165 | "prefix": "cite", 166 | "body": "$1$2", 167 | "description": "HTML - Defines a citation", 168 | "scope": "text.html" 169 | }, 170 | "code": { 171 | "prefix": "code", 172 | "body": "$1$2", 173 | "description": "HTML - Defines computer code text", 174 | "scope": "text.html" 175 | }, 176 | "col": { 177 | "prefix": "col", 178 | "body": "$2", 179 | "description": "HTML - Defines attributes for table columns", 180 | "scope": "text.html" 181 | }, 182 | "colgroup": { 183 | "prefix": "colgroup", 184 | "body": [ 185 | "", 186 | "\t$1", 187 | "" 188 | ], 189 | "description": "HTML - Defines group of table columns", 190 | "scope": "text.html" 191 | }, 192 | "command": { 193 | "prefix": "command", 194 | "body": "$1$2", 195 | "description": "HTML - Defines a command button [not supported]", 196 | "scope": "text.html" 197 | }, 198 | "datalist": { 199 | "prefix": "datalist", 200 | "body": [ 201 | "", 202 | "\t$1", 203 | "" 204 | ], 205 | "description": "HTML - Defines a dropdown list", 206 | "scope": "text.html" 207 | }, 208 | "dd": { 209 | "prefix": "dd", 210 | "body": "
$1
$2", 211 | "description": "HTML - Defines a definition description", 212 | "scope": "text.html" 213 | }, 214 | "del": { 215 | "prefix": "del", 216 | "body": "$1$2", 217 | "description": "HTML - Defines deleted text", 218 | "scope": "text.html" 219 | }, 220 | "details": { 221 | "prefix": "details", 222 | "body": [ 223 | "
", 224 | "\t$1", 225 | "
" 226 | ], 227 | "description": "HTML - Defines details of an element", 228 | "scope": "text.html" 229 | }, 230 | "dialog": { 231 | "prefix": "dialog", 232 | "body": "$1$2", 233 | "description": "HTML - Defines a dialog (conversation)", 234 | "scope": "text.html" 235 | }, 236 | "dfn": { 237 | "prefix": "dfn", 238 | "body": "$1$2", 239 | "description": "HTML - Defines a definition term", 240 | "scope": "text.html" 241 | }, 242 | "div": { 243 | "prefix": "div", 244 | "body": [ 245 | "
", 246 | "\t$1", 247 | "
" 248 | ], 249 | "description": "HTML - Defines a section in a document", 250 | "scope": "text.html" 251 | }, 252 | "dl": { 253 | "prefix": "dl", 254 | "body": [ 255 | "
", 256 | "\t$1", 257 | "
" 258 | ], 259 | "description": "HTML - Defines a definition list", 260 | "scope": "text.html" 261 | }, 262 | "dt": { 263 | "prefix": "dt", 264 | "body": "
$1
$2", 265 | "description": "HTML - Defines a definition term", 266 | "scope": "text.html" 267 | }, 268 | "em": { 269 | "prefix": "em", 270 | "body": "$1$2", 271 | "description": "HTML - Defines emphasized text", 272 | "scope": "text.html" 273 | }, 274 | "embed": { 275 | "prefix": "embed", 276 | "body": "$2", 277 | "description": "HTML - Defines external interactive content ot plugin", 278 | "scope": "text.html" 279 | }, 280 | "fieldset": { 281 | "prefix": "fieldset", 282 | "body": [ 283 | "
", 284 | "\t$1", 285 | "
" 286 | ], 287 | "description": "HTML - Defines a fieldset", 288 | "scope": "text.html" 289 | }, 290 | "figcaption": { 291 | "prefix": "figcaption", 292 | "body": "
$1
$2", 293 | "description": "HTML - Defines a caption for a figure", 294 | "scope": "text.html" 295 | }, 296 | "figure": { 297 | "prefix": "figure", 298 | "body": [ 299 | "
", 300 | "\t$1", 301 | "
" 302 | ], 303 | "description": "HTML - Defines a group of media content, and their caption", 304 | "scope": "text.html" 305 | }, 306 | "footer": { 307 | "prefix": "footer", 308 | "body": [ 309 | "" 312 | ], 313 | "description": "HTML - Defines a footer for a section or page", 314 | "scope": "text.html" 315 | }, 316 | "form": { 317 | "prefix": "form", 318 | "body": [ 319 | "
", 320 | "\t$1", 321 | "
" 322 | ], 323 | "description": "HTML - Defines a form", 324 | "scope": "text.html" 325 | }, 326 | "h1": { 327 | "prefix": "h1", 328 | "body": "

$1

$2", 329 | "description": "HTML - Defines header 1", 330 | "scope": "text.html" 331 | }, 332 | "h2": { 333 | "prefix": "h2", 334 | "body": "

$1

$2", 335 | "description": "HTML - Defines header 2", 336 | "scope": "text.html" 337 | }, 338 | "h3": { 339 | "prefix": "h3", 340 | "body": "

$1

$2", 341 | "description": "HTML - Defines header 3", 342 | "scope": "text.html" 343 | }, 344 | "h4": { 345 | "prefix": "h4", 346 | "body": "

$1

$2", 347 | "description": "HTML - Defines header 4", 348 | "scope": "text.html" 349 | }, 350 | "h5": { 351 | "prefix": "h5", 352 | "body": "
$1
$2", 353 | "description": "HTML - Defines header 5", 354 | "scope": "text.html" 355 | }, 356 | "h6": { 357 | "prefix": "h6", 358 | "body": "
$1
$2", 359 | "description": "HTML - Defines header 6", 360 | "scope": "text.html" 361 | }, 362 | "head": { 363 | "prefix": "head", 364 | "body": [ 365 | "", 366 | "\t$1", 367 | "" 368 | ], 369 | "description": "HTML - Defines information about the document", 370 | "scope": "text.html" 371 | }, 372 | "header": { 373 | "prefix": "header", 374 | "body": [ 375 | "
", 376 | "\t$1", 377 | "
" 378 | ], 379 | "description": "HTML - Defines a header for a section of page", 380 | "scope": "text.html" 381 | }, 382 | "hgroup": { 383 | "prefix": "hgroup", 384 | "body": [ 385 | "
", 386 | "\t$1", 387 | "
" 388 | ], 389 | "description": "HTML - Defines information about a section in a document", 390 | "scope": "text.html" 391 | }, 392 | "hr": { 393 | "prefix": "hr", 394 | "body": "
", 395 | "description": "HTML - Defines a horizontal rule", 396 | "scope": "text.html" 397 | }, 398 | "html": { 399 | "prefix": "html", 400 | "body": [ 401 | "", 402 | "\t$1", 403 | "" 404 | ], 405 | "description": "HTML - Defines an html document", 406 | "scope": "text.html" 407 | }, 408 | "html5": { 409 | "prefix": "html5", 410 | "body": [ 411 | "", 412 | "", 413 | "\t", 414 | "\t\t$2", 415 | "\t\t", 416 | "\t\t", 417 | "\t\t", 418 | "\t", 419 | "\t", 420 | "\t$4", 421 | "\t", 422 | "" 423 | ], 424 | "description": "HTML - Defines a template for a html5 document", 425 | "scope": "text.html" 426 | }, 427 | "i": { 428 | "prefix": "i", 429 | "body": "$1$2", 430 | "description": "HTML - Defines italic text", 431 | "scope": "text.html" 432 | }, 433 | "iframe": { 434 | "prefix": "iframe", 435 | "body": "$3", 436 | "description": "HTML - Defines an inline sub window", 437 | "scope": "text.html" 438 | }, 439 | "img": { 440 | "prefix": "img", 441 | "body": "\"$2\"$3", 442 | "description": "HTML - Defines an image", 443 | "scope": "text.html" 444 | }, 445 | "input": { 446 | "prefix": "input", 447 | "body": "$4", 448 | "description": "HTML - Defines an input field", 449 | "scope": "text.html" 450 | }, 451 | "ins": { 452 | "prefix": "ins", 453 | "body": "$1$2", 454 | "description": "HTML - Defines inserted text", 455 | "scope": "text.html" 456 | }, 457 | "keygen": { 458 | "prefix": "keygen", 459 | "body": "$2", 460 | "description": "HTML - Defines a generated key in a form", 461 | "scope": "text.html" 462 | }, 463 | "kbd": { 464 | "prefix": "kbd", 465 | "body": "$1$2", 466 | "description": "HTML - Defines keyboard text", 467 | "scope": "text.html" 468 | }, 469 | "label": { 470 | "prefix": "label", 471 | "body": "$3", 472 | "description": "HTML - Defines an inline window", 473 | "scope": "text.html" 474 | }, 475 | "legend": { 476 | "prefix": "legend", 477 | "body": "$1$2", 478 | "description": "HTML - Defines a title in a fieldset", 479 | "scope": "text.html" 480 | }, 481 | "li": { 482 | "prefix": "li", 483 | "body": "
  • $1
  • $2", 484 | "description": "HTML - Defines a list item", 485 | "scope": "text.html" 486 | }, 487 | "link": { 488 | "prefix": "link", 489 | "body": "$4", 490 | "description": "HTML - Defines a resource reference", 491 | "scope": "text.html" 492 | }, 493 | "main": { 494 | "prefix": "main", 495 | "body": [ 496 | "
    ", 497 | "\t$1", 498 | "
    " 499 | ], 500 | "description": "HTML - Defines an image map", 501 | "scope": "text.html" 502 | }, 503 | "map": { 504 | "prefix": "map", 505 | "body": [ 506 | "", 507 | "\t$2", 508 | "" 509 | ], 510 | "description": "HTML - Defines an image map", 511 | "scope": "text.html" 512 | }, 513 | "mark": { 514 | "prefix": "mark", 515 | "body": "$1$2", 516 | "description": "HTML - Defines marked text", 517 | "scope": "text.html" 518 | }, 519 | "menu": { 520 | "prefix": "menu", 521 | "body": [ 522 | "", 523 | "\t$1", 524 | "" 525 | ], 526 | "description": "HTML - Defines a menu list", 527 | "scope": "text.html" 528 | }, 529 | "menuitem": { 530 | "prefix": "menuitem", 531 | "body": "$1$2", 532 | "description": "HTML - Defines a menu item [firefox only]", 533 | "scope": "text.html" 534 | }, 535 | "meta": { 536 | "prefix": "meta", 537 | "body": "$3", 538 | "description": "HTML - Defines meta information", 539 | "scope": "text.html" 540 | }, 541 | "meter": { 542 | "prefix": "meter", 543 | "body": "$2$3", 544 | "description": "HTML - Defines measurement within a predefined range", 545 | "scope": "text.html" 546 | }, 547 | "nav": { 548 | "prefix": "nav", 549 | "body": [ 550 | "" 553 | ], 554 | "description": "HTML - Defines navigation links", 555 | "scope": "text.html" 556 | }, 557 | "noscript": { 558 | "prefix": "noscript", 559 | "body": [ 560 | "" 563 | ], 564 | "description": "HTML - Defines a noscript section", 565 | "scope": "text.html" 566 | }, 567 | "object": { 568 | "prefix": "object", 569 | "body": "$4$5", 570 | "description": "HTML - Defines an embedded object", 571 | "scope": "text.html" 572 | }, 573 | "ol": { 574 | "prefix": "ol", 575 | "body": [ 576 | "
      ", 577 | "\t$1", 578 | "
    " 579 | ], 580 | "description": "HTML - Defines an ordered list", 581 | "scope": "text.html" 582 | }, 583 | "optgroup": { 584 | "prefix": "optgroup", 585 | "body": [ 586 | "", 587 | "\t$1", 588 | "" 589 | ], 590 | "description": "HTML - Defines an option group", 591 | "scope": "text.html" 592 | }, 593 | "option": { 594 | "prefix": "option", 595 | "body": "$3", 596 | "description": "HTML - Defines an option in a drop-down list", 597 | "scope": "text.html" 598 | }, 599 | "output": { 600 | "prefix": "output", 601 | "body": "$3$4", 602 | "description": "HTML - Defines some types of output", 603 | "scope": "text.html" 604 | }, 605 | "p": { 606 | "prefix": "p", 607 | "body": "

    $1

    $2", 608 | "description": "HTML - Defines a paragraph", 609 | "scope": "text.html" 610 | }, 611 | "param": { 612 | "prefix": "param", 613 | "body": "$3", 614 | "description": "HTML - Defines a parameter for an object", 615 | "scope": "text.html" 616 | }, 617 | "pre": { 618 | "prefix": "pre", 619 | "body": [ 620 | "
    $1
    " 621 | ], 622 | "description": "HTML - Defines preformatted text", 623 | "scope": "text.html" 624 | }, 625 | "progress": { 626 | "prefix": "progress", 627 | "body": "$3$4", 628 | "description": "HTML - Defines progress of a task of any kind", 629 | "scope": "text.html" 630 | }, 631 | "q": { 632 | "prefix": "q", 633 | "body": "$1$2", 634 | "description": "HTML - Defines a short quotation", 635 | "scope": "text.html" 636 | }, 637 | "rp": { 638 | "prefix": "rp", 639 | "body": "$1$2", 640 | "description": "HTML - Used in ruby annotations to define what to show browsers that do not support the ruby element", 641 | "scope": "text.html" 642 | }, 643 | "rt": { 644 | "prefix": "rt", 645 | "body": "$1$2", 646 | "description": "HTML - Defines explanation to ruby annotations", 647 | "scope": "text.html" 648 | }, 649 | "ruby": { 650 | "prefix": "ruby", 651 | "body": [ 652 | "", 653 | "$1", 654 | "" 655 | ], 656 | "description": "HTML - Defines ruby annotations", 657 | "scope": "text.html" 658 | }, 659 | "s": { 660 | "prefix": "s", 661 | "body": "$1$2", 662 | "description": "HTML - Used to define strikethrough text", 663 | "scope": "text.html" 664 | }, 665 | "samp": { 666 | "prefix": "samp", 667 | "body": "$1$2", 668 | "description": "HTML - Defines sample computer code", 669 | "scope": "text.html" 670 | }, 671 | "script": { 672 | "prefix": "script", 673 | "body": [ 674 | "" 677 | ], 678 | "description": "HTML - Defines a script", 679 | "scope": "text.html" 680 | }, 681 | "section": { 682 | "prefix": "section", 683 | "body": [ 684 | "
    ", 685 | "\t$1", 686 | "
    " 687 | ], 688 | "description": "HTML - Defines a section", 689 | "scope": "text.html" 690 | }, 691 | "select": { 692 | "prefix": "select", 693 | "body": [ 694 | "" 697 | ], 698 | "description": "HTML - Defines a selectable list", 699 | "scope": "text.html" 700 | }, 701 | "small": { 702 | "prefix": "small", 703 | "body": "$1$2", 704 | "description": "HTML - Defines small text", 705 | "scope": "text.html" 706 | }, 707 | "source": { 708 | "prefix": "source", 709 | "body": "$3", 710 | "description": "HTML - Defines media resource", 711 | "scope": "text.html" 712 | }, 713 | "span": { 714 | "prefix": "span", 715 | "body": "$1$2", 716 | "description": "HTML - Defines a section in a document", 717 | "scope": "text.html" 718 | }, 719 | "strong": { 720 | "prefix": "strong", 721 | "body": "$1$2", 722 | "description": "HTML - Defines strong text", 723 | "scope": "text.html" 724 | }, 725 | "style": { 726 | "prefix": "style", 727 | "body": [ 728 | "" 731 | ], 732 | "description": "HTML - Defines a style definition", 733 | "scope": "text.html" 734 | }, 735 | "sub": { 736 | "prefix": "sub", 737 | "body": "$1$2", 738 | "description": "HTML - Defines sub-scripted text", 739 | "scope": "text.html" 740 | }, 741 | "sup": { 742 | "prefix": "sup", 743 | "body": "$1$2", 744 | "description": "HTML - Defines super-scripted text", 745 | "scope": "text.html" 746 | }, 747 | "summary": { 748 | "prefix": "summary", 749 | "body": "$1$2", 750 | "description": "HTML - Defines a visible heading for the detail element [limited support]", 751 | "scope": "text.html" 752 | }, 753 | "table": { 754 | "prefix": "table", 755 | "body": [ 756 | "", 757 | "\t$1", 758 | "
    " 759 | ], 760 | "description": "HTML - Defines a table", 761 | "scope": "text.html" 762 | }, 763 | "tbody": { 764 | "prefix": "tbody", 765 | "body": [ 766 | "", 767 | "\t$1", 768 | "" 769 | ], 770 | "description": "HTML - Defines a table body", 771 | "scope": "text.html" 772 | }, 773 | "td": { 774 | "prefix": "td", 775 | "body": "$1$2", 776 | "description": "HTML - Defines a table cell", 777 | "scope": "text.html" 778 | }, 779 | "textarea": { 780 | "prefix": "textarea", 781 | "body": "$4", 782 | "description": "HTML - Defines a text area", 783 | "scope": "text.html" 784 | }, 785 | "tfoot": { 786 | "prefix": "tfoot", 787 | "body": [ 788 | "", 789 | "\t$1", 790 | "" 791 | ], 792 | "description": "HTML - Defines a table footer", 793 | "scope": "text.html" 794 | }, 795 | "thead": { 796 | "prefix": "thead", 797 | "body": [ 798 | "", 799 | "$1", 800 | "" 801 | ], 802 | "description": "HTML - Defines a table head", 803 | "scope": "text.html" 804 | }, 805 | "th": { 806 | "prefix": "th", 807 | "body": "$1$2", 808 | "description": "HTML - Defines a table header", 809 | "scope": "text.html" 810 | }, 811 | "time": { 812 | "prefix": "time", 813 | "body": "$3", 814 | "description": "HTML - Defines a date/time", 815 | "scope": "text.html" 816 | }, 817 | "title": { 818 | "prefix": "title", 819 | "body": "$1$2", 820 | "description": "HTML - Defines the document title", 821 | "scope": "text.html" 822 | }, 823 | "tr": { 824 | "prefix": "tr", 825 | "body": "$1$2", 826 | "description": "HTML - Defines a table row", 827 | "scope": "text.html" 828 | }, 829 | "track": { 830 | "prefix": "track", 831 | "body": "$5", 832 | "description": "HTML - Defines a table row", 833 | "scope": "text.html" 834 | }, 835 | "u": { 836 | "prefix": "u", 837 | "body": "$1$2", 838 | "description": "HTML - Used to define underlined text", 839 | "scope": "text.html" 840 | }, 841 | "ul": { 842 | "prefix": "ul", 843 | "body": [ 844 | "" 847 | ], 848 | "description": "HTML - Defines an unordered list", 849 | "scope": "text.html" 850 | }, 851 | "video": { 852 | "prefix": "video", 853 | "body": [ 854 | "" 857 | ], 858 | "description": "HTML - Defines a video", 859 | "scope": "text.html" 860 | }, 861 | "if": { 862 | "prefix": "if", 863 | "body": [ 864 | "if ${1:expression}:", 865 | "\t${2:pass}" 866 | ], 867 | "description": "Code snippet for an if statement" 868 | }, 869 | "if/else": { 870 | "prefix": "if/else", 871 | "body": [ 872 | "if ${1:condition}:", 873 | "\t${2:pass}", 874 | "else:", 875 | "\t${3:pass}" 876 | ], 877 | "description": "Code snippet for an if statement with else" 878 | }, 879 | "elif": { 880 | "prefix": "elif", 881 | "body": [ 882 | "elif ${1:expression}:", 883 | "\t${2:pass}" 884 | ], 885 | "description": "Code snippet for an elif" 886 | }, 887 | "else": { 888 | "prefix": "else", 889 | "body": [ 890 | "else:", 891 | "\t${1:pass}" 892 | ], 893 | "description": "Code snippet for an else" 894 | }, 895 | "while": { 896 | "prefix": "while", 897 | "body": [ 898 | "while ${1:expression}:", 899 | "\t${2:pass}" 900 | ], 901 | "description": "Code snippet for a while loop" 902 | }, 903 | "while/else": { 904 | "prefix": "while/else", 905 | "body": [ 906 | "while ${1:expression}:", 907 | "\t${2:pass}", 908 | "else:", 909 | "\t${3:pass}" 910 | ], 911 | "description": "Code snippet for a while loop with else" 912 | }, 913 | "for": { 914 | "prefix": "for", 915 | "body": [ 916 | "for ${1:target_list} in ${2:expression_list}:", 917 | "\t${3:pass}" 918 | ], 919 | "description": "Code snippet for a for loop" 920 | }, 921 | "for/else": { 922 | "prefix": "for/else", 923 | "body": [ 924 | "for ${1:target_list} in ${2:expression_list}:", 925 | "\t${3:pass}", 926 | "else:", 927 | "\t${4:pass}" 928 | ], 929 | "description": "Code snippet for a for loop with else" 930 | }, 931 | "try/except": { 932 | "prefix": "try/except", 933 | "body": [ 934 | "try:", 935 | "\t${1:pass}", 936 | "except ${2:expression} as ${3:identifier}:", 937 | "\t${4:pass}" 938 | ], 939 | "description": "Code snippet for a try/except statement" 940 | }, 941 | "try/finally": { 942 | "prefix": "try/finally", 943 | "body": [ 944 | "try:", 945 | "\t${1:pass}", 946 | "finally:", 947 | "\t${2:pass}" 948 | ], 949 | "description": "Code snippet for a try/finally statement" 950 | }, 951 | "try/except/else": { 952 | "prefix": "try/except/else", 953 | "body": [ 954 | "try:", 955 | "\t${1:pass}", 956 | "except ${2:expression} as ${3:identifier}:", 957 | "\t${4:pass}", 958 | "else:", 959 | "\t${5:pass}" 960 | ], 961 | "description": "Code snippet for a try/except/else statement" 962 | }, 963 | "try/except/finally": { 964 | "prefix": "try/except/finally", 965 | "body": [ 966 | "try:", 967 | "\t${1:pass}", 968 | "except ${2:expression} as ${3:identifier}:", 969 | "\t${4:pass}", 970 | "finally:", 971 | "\t${5:pass}" 972 | ], 973 | "description": "Code snippet for a try/except/finally statement" 974 | }, 975 | "try/except/else/finally": { 976 | "prefix": "try/except/else/finally", 977 | "body": [ 978 | "try:", 979 | "\t${1:pass}", 980 | "except ${2:expression} as ${3:identifier}:", 981 | "\t${4:pass}", 982 | "else:", 983 | "\t${5:pass}", 984 | "finally:", 985 | "\t${6:pass}" 986 | ], 987 | "description": "Code snippet for a try/except/else/finally statement" 988 | }, 989 | "with": { 990 | "prefix": "with", 991 | "body": [ 992 | "with ${1:expression} as ${2:target}:", 993 | "\t${3:pass}" 994 | ], 995 | "description": "Code snippet for a with statement" 996 | }, 997 | "def": { 998 | "prefix": "def", 999 | "body": [ 1000 | "def ${1:funcname}(${2:parameter_list}):", 1001 | "\t${3:pass}" 1002 | ], 1003 | "description": "Code snippet for a function definition" 1004 | }, 1005 | "def(class method)": { 1006 | "prefix": "def(class method)", 1007 | "body": [ 1008 | "def ${1:funcname}(self, ${2:parameter_list}):", 1009 | "\t${3:pass}" 1010 | ], 1011 | "description": "Code snippet for a class method" 1012 | }, 1013 | "def(static class method)": { 1014 | "prefix": "def(static class method)", 1015 | "body": [ 1016 | "@staticmethod", 1017 | "def ${1:funcname}(${2:parameter_list}):", 1018 | "\t${3:pass}" 1019 | ], 1020 | "description": "Code snippet for a static class method" 1021 | }, 1022 | "def(abstract class method)": { 1023 | "prefix": "def(abstract class method)", 1024 | "body": [ 1025 | "def ${1:funcname}(self, ${2:parameter_list}):", 1026 | "\traise NotImplementedError" 1027 | ], 1028 | "description": "Code snippet for an abstract class method" 1029 | }, 1030 | "class": { 1031 | "prefix": "class", 1032 | "body": [ 1033 | "class ${1:classname}(${2:object}):", 1034 | "\t${3:pass}" 1035 | ], 1036 | "description": "Code snippet for a class definition" 1037 | }, 1038 | "lambda": { 1039 | "prefix": "lambda", 1040 | "body": [ 1041 | "lambda ${1:parameter_list}: ${2:expression}" 1042 | ], 1043 | "description": "Code snippet for a lambda statement" 1044 | }, 1045 | "if(main)": { 1046 | "prefix": "__main__", 1047 | "body": [ 1048 | "if __name__ == \"__main__\":", 1049 | " ${1:pass}" 1050 | ], 1051 | "description": "Code snippet for a `if __name__ == \"__main__\": ...` block" 1052 | }, 1053 | "async/def": { 1054 | "prefix": "async/def", 1055 | "body": [ 1056 | "async def ${1:funcname}(${2:parameter_list}):", 1057 | "\t${3:pass}" 1058 | ], 1059 | "description": "Code snippet for an async statement" 1060 | }, 1061 | "async/for": { 1062 | "prefix": "async/for", 1063 | "body": [ 1064 | "async for ${1:target} in ${2:iter}:", 1065 | "\t${3:block}" 1066 | ], 1067 | "description": "Code snippet for an async for statement" 1068 | }, 1069 | "async/for/else": { 1070 | "prefix": "async/for/else", 1071 | "body": [ 1072 | "async for ${1:target} in ${2:iter}:", 1073 | "\t${3:block}", 1074 | "else:", 1075 | "\t${4:block}" 1076 | ], 1077 | "description": "Code snippet for an async for statement with else" 1078 | }, 1079 | "async/with": { 1080 | "prefix": "async/with", 1081 | "body": [ 1082 | "async with ${1:expr} as ${2:var}:", 1083 | "\t${3:block}" 1084 | ], 1085 | "description": "Code snippet for an async with statement" 1086 | }, 1087 | "ipdb": { 1088 | "prefix": "ipdb", 1089 | "body": "import ipdb; ipdb.set_trace()", 1090 | "description": "Code snippet for ipdb debug" 1091 | }, 1092 | "pdb": { 1093 | "prefix": "pdb", 1094 | "body": "import pdb; pdb.set_trace()", 1095 | "description": "Code snippet for pdb debug" 1096 | }, 1097 | "pudb": { 1098 | "prefix": "pudb", 1099 | "body": "import pudb; pudb.set_trace()", 1100 | "description": "Code snippet for pudb debug" 1101 | }, 1102 | "Comment": { 1103 | "prefix": "comment", 1104 | "description": "Comment block", 1105 | "body": [ 1106 | "{% comment \"$1\" %}", 1107 | "$2", 1108 | "{% endcomment %}" 1109 | ] 1110 | }, 1111 | "var": { 1112 | "prefix": "var", 1113 | "description": "Empty Var", 1114 | "body": [ 1115 | "{{ $1 }}" 1116 | ] 1117 | }, 1118 | "tag": { 1119 | "prefix": "tag", 1120 | "description": "Empty tag", 1121 | "body": [ 1122 | "{% $1 %}" 1123 | ] 1124 | }, 1125 | "CSRF": { 1126 | "prefix": "csrf", 1127 | "description": "CSRF token", 1128 | "body": [ 1129 | "{% csrf_token %}" 1130 | ] 1131 | }, 1132 | "Extends": { 1133 | "prefix": "extends", 1134 | "description": "Extends block", 1135 | "body": [ 1136 | "{% extends \"$1\" %}" 1137 | ] 1138 | }, 1139 | "For loop": { 1140 | "prefix": "for", 1141 | "description": "For loop", 1142 | "body": [ 1143 | "{% for $1 in $2 %}", 1144 | "$3", 1145 | "{% endfor %}" 1146 | ] 1147 | }, 1148 | "For-Empty loop": { 1149 | "prefix": "forempty", 1150 | "description": "For-Empty loop", 1151 | "body": [ 1152 | "{% for $1 in $2 %}", 1153 | "$3", 1154 | "{% empty %}", 1155 | "$4", 1156 | "{% endfor %}" 1157 | ] 1158 | }, 1159 | "If condition": { 1160 | "prefix": "if", 1161 | "description": "IF condition", 1162 | "body": [ 1163 | "{% if $1 %}", 1164 | "$2", 1165 | "{% else %}", 1166 | "{% endif %}" 1167 | ] 1168 | }, 1169 | "Include": { 1170 | "prefix": "include", 1171 | "description": "Include other templates", 1172 | "body": [ 1173 | "{% include \"$1\" %}" 1174 | ] 1175 | }, 1176 | "Lorem": { 1177 | "prefix": "lorem", 1178 | "description": "Generate Lorem Text Block", 1179 | "body": [ 1180 | "{% lorem ${how_many_paragraphs} %}" 1181 | ] 1182 | }, 1183 | "Spaceless": { 1184 | "prefix": "spaceless", 1185 | "description": "Removes whitespaces in between", 1186 | "body": [ 1187 | "{% spaceless %}", 1188 | "$1", 1189 | "{% endspaceless %}" 1190 | ] 1191 | }, 1192 | "Super": { 1193 | "prefix": "super", 1194 | "description": "Super block", 1195 | "body": [ 1196 | "{{ block.super }}" 1197 | ] 1198 | }, 1199 | "Template Block": { 1200 | "prefix": "block", 1201 | "description": "Creates a block", 1202 | "body": [ 1203 | "{% block $1 %}", 1204 | "$2", 1205 | "{% endblock $1 %}" 1206 | ] 1207 | }, 1208 | "URL": { 1209 | "prefix": "url", 1210 | "description": "URL tag", 1211 | "body": [ 1212 | "{% url '${some-url-name}' ${arg} %}" 1213 | ] 1214 | }, 1215 | "With": { 1216 | "prefix": "with", 1217 | "description": "With block", 1218 | "body": [ 1219 | "{% with ${local_var}=${context_var} %}", 1220 | "$1", 1221 | "{% endwith %}" 1222 | ] 1223 | }, 1224 | "Static": { 1225 | "prefix": "static", 1226 | "description": "Static file", 1227 | "body": [ 1228 | "{% static '$1' %}" 1229 | ] 1230 | } 1231 | } -------------------------------------------------------------------------------- /snippets/test.json: -------------------------------------------------------------------------------- 1 | { 2 | "doctype": { 3 | "prefix": "doctype", 4 | "body": [ 5 | "", 6 | "$1" 7 | ], 8 | "description": "HTML - Defines the document type", 9 | "scope": "text.html" 10 | }, 11 | "a": { 12 | "prefix": "a", 13 | "body": "$2$3", 14 | "description": "HTML - Defines a hyperlink", 15 | "scope": "text.html" 16 | }, 17 | "abbr": { 18 | "prefix": "abbr", 19 | "body": "$2$3", 20 | "description": "HTML - Defines an abbreviation", 21 | "scope": "text.html" 22 | }, 23 | "address": { 24 | "prefix": "address", 25 | "body": [ 26 | "
    ", 27 | "$1", 28 | "
    " 29 | ], 30 | "description": "HTML - Defines an address element", 31 | "scope": "text.html" 32 | }, 33 | "area": { 34 | "prefix": "area", 35 | "body": "\"$4\"$5", 36 | "description": "HTML - Defines an area inside an image map", 37 | "scope": "text.html" 38 | }, 39 | "article": { 40 | "prefix": "article", 41 | "body": [ 42 | "
    ", 43 | "\t$1", 44 | "
    " 45 | ], 46 | "description": "HTML - Defines an article", 47 | "scope": "text.html" 48 | }, 49 | "aside": { 50 | "prefix": "aside", 51 | "body": [ 52 | "$2" 55 | ], 56 | "description": "HTML - Defines content aside from the page content", 57 | "scope": "text.html" 58 | }, 59 | "audio": { 60 | "prefix": "audio", 61 | "body": [ 62 | "" 65 | ], 66 | "description": "HTML - Defines sounds content", 67 | "scope": "text.html" 68 | }, 69 | "b": { 70 | "prefix": "b", 71 | "body": "$1$2", 72 | "description": "HTML - Defines bold text", 73 | "scope": "text.html" 74 | }, 75 | "base": { 76 | "prefix": "base", 77 | "body": "$3", 78 | "description": "HTML - Defines a base URL for all the links in a page", 79 | "scope": "text.html" 80 | }, 81 | "bdi": { 82 | "prefix": "bdi", 83 | "body": "$1$2", 84 | "description": "HTML - Used to isolate text that is of unknown directionality", 85 | "scope": "text.html" 86 | }, 87 | "bdo": { 88 | "prefix": "bdo", 89 | "body": [ 90 | "", 91 | "$2", 92 | "" 93 | ], 94 | "description": "HTML - Defines the direction of text display", 95 | "scope": "text.html" 96 | }, 97 | "big": { 98 | "prefix": "big", 99 | "body": "$1$2", 100 | "description": "HTML - Used to make text bigger", 101 | "scope": "text.html" 102 | }, 103 | "blockquote": { 104 | "prefix": "blockquote", 105 | "body": [ 106 | "
    ", 107 | "\t$1", 108 | "
    " 109 | ], 110 | "description": "HTML - Defines a long quotation", 111 | "scope": "text.html" 112 | }, 113 | "body": { 114 | "prefix": "body", 115 | "body": [ 116 | "", 117 | "\t$1", 118 | "" 119 | ], 120 | "description": "HTML - Defines the body element", 121 | "scope": "text.html" 122 | }, 123 | "br": { 124 | "prefix": "br", 125 | "body": "
    ", 126 | "description": "HTML - Inserts a single line break", 127 | "scope": "text.html" 128 | }, 129 | "button": { 130 | "prefix": "button", 131 | "body": "$3", 132 | "description": "HTML - Defines a push button", 133 | "scope": "text.html" 134 | }, 135 | "canvas": { 136 | "prefix": "canvas", 137 | "body": "$2$3", 138 | "description": "HTML - Defines graphics", 139 | "scope": "text.html" 140 | }, 141 | "caption": { 142 | "prefix": "caption", 143 | "body": "$1$2", 144 | "description": "HTML - Defines a table caption", 145 | "scope": "text.html" 146 | }, 147 | "cite": { 148 | "prefix": "cite", 149 | "body": "$1$2", 150 | "description": "HTML - Defines a citation", 151 | "scope": "text.html" 152 | }, 153 | "code": { 154 | "prefix": "code", 155 | "body": "$1$2", 156 | "description": "HTML - Defines computer code text", 157 | "scope": "text.html" 158 | }, 159 | "col": { 160 | "prefix": "col", 161 | "body": "$2", 162 | "description": "HTML - Defines attributes for table columns", 163 | "scope": "text.html" 164 | }, 165 | "colgroup": { 166 | "prefix": "colgroup", 167 | "body": [ 168 | "", 169 | "\t$1", 170 | "" 171 | ], 172 | "description": "HTML - Defines group of table columns", 173 | "scope": "text.html" 174 | }, 175 | "command": { 176 | "prefix": "command", 177 | "body": "$1$2", 178 | "description": "HTML - Defines a command button [not supported]", 179 | "scope": "text.html" 180 | }, 181 | "datalist": { 182 | "prefix": "datalist", 183 | "body": [ 184 | "", 185 | "\t$1", 186 | "" 187 | ], 188 | "description": "HTML - Defines a dropdown list", 189 | "scope": "text.html" 190 | }, 191 | "dd": { 192 | "prefix": "dd", 193 | "body": "
    $1
    $2", 194 | "description": "HTML - Defines a definition description", 195 | "scope": "text.html" 196 | }, 197 | "del": { 198 | "prefix": "del", 199 | "body": "$1$2", 200 | "description": "HTML - Defines deleted text", 201 | "scope": "text.html" 202 | }, 203 | "details": { 204 | "prefix": "details", 205 | "body": [ 206 | "
    ", 207 | "\t$1", 208 | "
    " 209 | ], 210 | "description": "HTML - Defines details of an element", 211 | "scope": "text.html" 212 | }, 213 | "dialog": { 214 | "prefix": "dialog", 215 | "body": "$1$2", 216 | "description": "HTML - Defines a dialog (conversation)", 217 | "scope": "text.html" 218 | }, 219 | "dfn": { 220 | "prefix": "dfn", 221 | "body": "$1$2", 222 | "description": "HTML - Defines a definition term", 223 | "scope": "text.html" 224 | }, 225 | "div": { 226 | "prefix": "div", 227 | "body": [ 228 | "
    ", 229 | "\t$1", 230 | "
    " 231 | ], 232 | "description": "HTML - Defines a section in a document", 233 | "scope": "text.html" 234 | }, 235 | "dl": { 236 | "prefix": "dl", 237 | "body": [ 238 | "
    ", 239 | "\t$1", 240 | "
    " 241 | ], 242 | "description": "HTML - Defines a definition list", 243 | "scope": "text.html" 244 | }, 245 | "dt": { 246 | "prefix": "dt", 247 | "body": "
    $1
    $2", 248 | "description": "HTML - Defines a definition term", 249 | "scope": "text.html" 250 | }, 251 | "em": { 252 | "prefix": "em", 253 | "body": "$1$2", 254 | "description": "HTML - Defines emphasized text", 255 | "scope": "text.html" 256 | }, 257 | "embed": { 258 | "prefix": "embed", 259 | "body": "$2", 260 | "description": "HTML - Defines external interactive content ot plugin", 261 | "scope": "text.html" 262 | }, 263 | "fieldset": { 264 | "prefix": "fieldset", 265 | "body": [ 266 | "
    ", 267 | "\t$1", 268 | "
    " 269 | ], 270 | "description": "HTML - Defines a fieldset", 271 | "scope": "text.html" 272 | }, 273 | "figcaption": { 274 | "prefix": "figcaption", 275 | "body": "
    $1
    $2", 276 | "description": "HTML - Defines a caption for a figure", 277 | "scope": "text.html" 278 | }, 279 | "figure": { 280 | "prefix": "figure", 281 | "body": [ 282 | "
    ", 283 | "\t$1", 284 | "
    " 285 | ], 286 | "description": "HTML - Defines a group of media content, and their caption", 287 | "scope": "text.html" 288 | }, 289 | "footer": { 290 | "prefix": "footer", 291 | "body": [ 292 | "" 295 | ], 296 | "description": "HTML - Defines a footer for a section or page", 297 | "scope": "text.html" 298 | }, 299 | "form": { 300 | "prefix": "form", 301 | "body": [ 302 | "
    ", 303 | "\t$1", 304 | "
    " 305 | ], 306 | "description": "HTML - Defines a form", 307 | "scope": "text.html" 308 | }, 309 | "h1": { 310 | "prefix": "h1", 311 | "body": "

    $1

    $2", 312 | "description": "HTML - Defines header 1", 313 | "scope": "text.html" 314 | }, 315 | "h2": { 316 | "prefix": "h2", 317 | "body": "

    $1

    $2", 318 | "description": "HTML - Defines header 2", 319 | "scope": "text.html" 320 | }, 321 | "h3": { 322 | "prefix": "h3", 323 | "body": "

    $1

    $2", 324 | "description": "HTML - Defines header 3", 325 | "scope": "text.html" 326 | }, 327 | "h4": { 328 | "prefix": "h4", 329 | "body": "

    $1

    $2", 330 | "description": "HTML - Defines header 4", 331 | "scope": "text.html" 332 | }, 333 | "h5": { 334 | "prefix": "h5", 335 | "body": "
    $1
    $2", 336 | "description": "HTML - Defines header 5", 337 | "scope": "text.html" 338 | }, 339 | "h6": { 340 | "prefix": "h6", 341 | "body": "
    $1
    $2", 342 | "description": "HTML - Defines header 6", 343 | "scope": "text.html" 344 | }, 345 | "head": { 346 | "prefix": "head", 347 | "body": [ 348 | "", 349 | "\t$1", 350 | "" 351 | ], 352 | "description": "HTML - Defines information about the document", 353 | "scope": "text.html" 354 | }, 355 | "header": { 356 | "prefix": "header", 357 | "body": [ 358 | "
    ", 359 | "\t$1", 360 | "
    " 361 | ], 362 | "description": "HTML - Defines a header for a section of page", 363 | "scope": "text.html" 364 | }, 365 | "hgroup": { 366 | "prefix": "hgroup", 367 | "body": [ 368 | "
    ", 369 | "\t$1", 370 | "
    " 371 | ], 372 | "description": "HTML - Defines information about a section in a document", 373 | "scope": "text.html" 374 | }, 375 | "hr": { 376 | "prefix": "hr", 377 | "body": "
    ", 378 | "description": "HTML - Defines a horizontal rule", 379 | "scope": "text.html" 380 | }, 381 | "html": { 382 | "prefix": "html", 383 | "body": [ 384 | "", 385 | "\t$1", 386 | "" 387 | ], 388 | "description": "HTML - Defines an html document", 389 | "scope": "text.html" 390 | }, 391 | "html5": { 392 | "prefix": "html5", 393 | "body": [ 394 | "", 395 | "", 396 | "\t", 397 | "\t\t$2", 398 | "\t\t", 399 | "\t\t", 400 | "\t\t", 401 | "\t", 402 | "\t", 403 | "\t$4", 404 | "\t", 405 | "" 406 | ], 407 | "description": "HTML - Defines a template for a html5 document", 408 | "scope": "text.html" 409 | }, 410 | "i": { 411 | "prefix": "i", 412 | "body": "$1$2", 413 | "description": "HTML - Defines italic text", 414 | "scope": "text.html" 415 | }, 416 | "iframe": { 417 | "prefix": "iframe", 418 | "body": "$3", 419 | "description": "HTML - Defines an inline sub window", 420 | "scope": "text.html" 421 | }, 422 | "img": { 423 | "prefix": "img", 424 | "body": "\"$2\"$3", 425 | "description": "HTML - Defines an image", 426 | "scope": "text.html" 427 | }, 428 | "input": { 429 | "prefix": "input", 430 | "body": "$4", 431 | "description": "HTML - Defines an input field", 432 | "scope": "text.html" 433 | }, 434 | "ins": { 435 | "prefix": "ins", 436 | "body": "$1$2", 437 | "description": "HTML - Defines inserted text", 438 | "scope": "text.html" 439 | }, 440 | "keygen": { 441 | "prefix": "keygen", 442 | "body": "$2", 443 | "description": "HTML - Defines a generated key in a form", 444 | "scope": "text.html" 445 | }, 446 | "kbd": { 447 | "prefix": "kbd", 448 | "body": "$1$2", 449 | "description": "HTML - Defines keyboard text", 450 | "scope": "text.html" 451 | }, 452 | "label": { 453 | "prefix": "label", 454 | "body": "$3", 455 | "description": "HTML - Defines an inline window", 456 | "scope": "text.html" 457 | }, 458 | "legend": { 459 | "prefix": "legend", 460 | "body": "$1$2", 461 | "description": "HTML - Defines a title in a fieldset", 462 | "scope": "text.html" 463 | }, 464 | "li": { 465 | "prefix": "li", 466 | "body": "
  • $1
  • $2", 467 | "description": "HTML - Defines a list item", 468 | "scope": "text.html" 469 | }, 470 | "link": { 471 | "prefix": "link", 472 | "body": "$4", 473 | "description": "HTML - Defines a resource reference", 474 | "scope": "text.html" 475 | }, 476 | "main": { 477 | "prefix": "main", 478 | "body": [ 479 | "
    ", 480 | "\t$1", 481 | "
    " 482 | ], 483 | "description": "HTML - Defines an image map", 484 | "scope": "text.html" 485 | }, 486 | "map": { 487 | "prefix": "map", 488 | "body": [ 489 | "", 490 | "\t$2", 491 | "" 492 | ], 493 | "description": "HTML - Defines an image map", 494 | "scope": "text.html" 495 | }, 496 | "mark": { 497 | "prefix": "mark", 498 | "body": "$1$2", 499 | "description": "HTML - Defines marked text", 500 | "scope": "text.html" 501 | }, 502 | "menu": { 503 | "prefix": "menu", 504 | "body": [ 505 | "", 506 | "\t$1", 507 | "" 508 | ], 509 | "description": "HTML - Defines a menu list", 510 | "scope": "text.html" 511 | }, 512 | "menuitem": { 513 | "prefix": "menuitem", 514 | "body": "$1$2", 515 | "description": "HTML - Defines a menu item [firefox only]", 516 | "scope": "text.html" 517 | }, 518 | "meta": { 519 | "prefix": "meta", 520 | "body": "$3", 521 | "description": "HTML - Defines meta information", 522 | "scope": "text.html" 523 | }, 524 | "meter": { 525 | "prefix": "meter", 526 | "body": "$2$3", 527 | "description": "HTML - Defines measurement within a predefined range", 528 | "scope": "text.html" 529 | }, 530 | "nav": { 531 | "prefix": "nav", 532 | "body": [ 533 | "" 536 | ], 537 | "description": "HTML - Defines navigation links", 538 | "scope": "text.html" 539 | }, 540 | "noscript": { 541 | "prefix": "noscript", 542 | "body": [ 543 | "" 546 | ], 547 | "description": "HTML - Defines a noscript section", 548 | "scope": "text.html" 549 | }, 550 | "object": { 551 | "prefix": "object", 552 | "body": "$4$5", 553 | "description": "HTML - Defines an embedded object", 554 | "scope": "text.html" 555 | }, 556 | "ol": { 557 | "prefix": "ol", 558 | "body": [ 559 | "
      ", 560 | "\t$1", 561 | "
    " 562 | ], 563 | "description": "HTML - Defines an ordered list", 564 | "scope": "text.html" 565 | }, 566 | "optgroup": { 567 | "prefix": "optgroup", 568 | "body": [ 569 | "", 570 | "\t$1", 571 | "" 572 | ], 573 | "description": "HTML - Defines an option group", 574 | "scope": "text.html" 575 | }, 576 | "option": { 577 | "prefix": "option", 578 | "body": "$3", 579 | "description": "HTML - Defines an option in a drop-down list", 580 | "scope": "text.html" 581 | }, 582 | "output": { 583 | "prefix": "output", 584 | "body": "$3$4", 585 | "description": "HTML - Defines some types of output", 586 | "scope": "text.html" 587 | }, 588 | "p": { 589 | "prefix": "p", 590 | "body": "

    $1

    $2", 591 | "description": "HTML - Defines a paragraph", 592 | "scope": "text.html" 593 | }, 594 | "param": { 595 | "prefix": "param", 596 | "body": "$3", 597 | "description": "HTML - Defines a parameter for an object", 598 | "scope": "text.html" 599 | }, 600 | "pre": { 601 | "prefix": "pre", 602 | "body": [ 603 | "
    $1
    " 604 | ], 605 | "description": "HTML - Defines preformatted text", 606 | "scope": "text.html" 607 | }, 608 | "progress": { 609 | "prefix": "progress", 610 | "body": "$3$4", 611 | "description": "HTML - Defines progress of a task of any kind", 612 | "scope": "text.html" 613 | }, 614 | "q": { 615 | "prefix": "q", 616 | "body": "$1$2", 617 | "description": "HTML - Defines a short quotation", 618 | "scope": "text.html" 619 | }, 620 | "rp": { 621 | "prefix": "rp", 622 | "body": "$1$2", 623 | "description": "HTML - Used in ruby annotations to define what to show browsers that do not support the ruby element", 624 | "scope": "text.html" 625 | }, 626 | "rt": { 627 | "prefix": "rt", 628 | "body": "$1$2", 629 | "description": "HTML - Defines explanation to ruby annotations", 630 | "scope": "text.html" 631 | }, 632 | "ruby": { 633 | "prefix": "ruby", 634 | "body": [ 635 | "", 636 | "$1", 637 | "" 638 | ], 639 | "description": "HTML - Defines ruby annotations", 640 | "scope": "text.html" 641 | }, 642 | "s": { 643 | "prefix": "s", 644 | "body": "$1$2", 645 | "description": "HTML - Used to define strikethrough text", 646 | "scope": "text.html" 647 | }, 648 | "samp": { 649 | "prefix": "samp", 650 | "body": "$1$2", 651 | "description": "HTML - Defines sample computer code", 652 | "scope": "text.html" 653 | }, 654 | "script": { 655 | "prefix": "script", 656 | "body": [ 657 | "" 660 | ], 661 | "description": "HTML - Defines a script", 662 | "scope": "text.html" 663 | }, 664 | "section": { 665 | "prefix": "section", 666 | "body": [ 667 | "
    ", 668 | "\t$1", 669 | "
    " 670 | ], 671 | "description": "HTML - Defines a section", 672 | "scope": "text.html" 673 | }, 674 | "select": { 675 | "prefix": "select", 676 | "body": [ 677 | "" 680 | ], 681 | "description": "HTML - Defines a selectable list", 682 | "scope": "text.html" 683 | }, 684 | "small": { 685 | "prefix": "small", 686 | "body": "$1$2", 687 | "description": "HTML - Defines small text", 688 | "scope": "text.html" 689 | }, 690 | "source": { 691 | "prefix": "source", 692 | "body": "$3", 693 | "description": "HTML - Defines media resource", 694 | "scope": "text.html" 695 | }, 696 | "span": { 697 | "prefix": "span", 698 | "body": "$1$2", 699 | "description": "HTML - Defines a section in a document", 700 | "scope": "text.html" 701 | }, 702 | "strong": { 703 | "prefix": "strong", 704 | "body": "$1$2", 705 | "description": "HTML - Defines strong text", 706 | "scope": "text.html" 707 | }, 708 | "style": { 709 | "prefix": "style", 710 | "body": [ 711 | "" 714 | ], 715 | "description": "HTML - Defines a style definition", 716 | "scope": "text.html" 717 | }, 718 | "sub": { 719 | "prefix": "sub", 720 | "body": "$1$2", 721 | "description": "HTML - Defines sub-scripted text", 722 | "scope": "text.html" 723 | }, 724 | "sup": { 725 | "prefix": "sup", 726 | "body": "$1$2", 727 | "description": "HTML - Defines super-scripted text", 728 | "scope": "text.html" 729 | }, 730 | "summary": { 731 | "prefix": "summary", 732 | "body": "$1$2", 733 | "description": "HTML - Defines a visible heading for the detail element [limited support]", 734 | "scope": "text.html" 735 | }, 736 | "table": { 737 | "prefix": "table", 738 | "body": [ 739 | "", 740 | "\t$1", 741 | "
    " 742 | ], 743 | "description": "HTML - Defines a table", 744 | "scope": "text.html" 745 | }, 746 | "tbody": { 747 | "prefix": "tbody", 748 | "body": [ 749 | "", 750 | "\t$1", 751 | "" 752 | ], 753 | "description": "HTML - Defines a table body", 754 | "scope": "text.html" 755 | }, 756 | "td": { 757 | "prefix": "td", 758 | "body": "$1$2", 759 | "description": "HTML - Defines a table cell", 760 | "scope": "text.html" 761 | }, 762 | "textarea": { 763 | "prefix": "textarea", 764 | "body": "$4", 765 | "description": "HTML - Defines a text area", 766 | "scope": "text.html" 767 | }, 768 | "tfoot": { 769 | "prefix": "tfoot", 770 | "body": [ 771 | "", 772 | "\t$1", 773 | "" 774 | ], 775 | "description": "HTML - Defines a table footer", 776 | "scope": "text.html" 777 | }, 778 | "thead": { 779 | "prefix": "thead", 780 | "body": [ 781 | "", 782 | "$1", 783 | "" 784 | ], 785 | "description": "HTML - Defines a table head", 786 | "scope": "text.html" 787 | }, 788 | "th": { 789 | "prefix": "th", 790 | "body": "$1$2", 791 | "description": "HTML - Defines a table header", 792 | "scope": "text.html" 793 | }, 794 | "time": { 795 | "prefix": "time", 796 | "body": "$3", 797 | "description": "HTML - Defines a date/time", 798 | "scope": "text.html" 799 | }, 800 | "title": { 801 | "prefix": "title", 802 | "body": "$1$2", 803 | "description": "HTML - Defines the document title", 804 | "scope": "text.html" 805 | }, 806 | "tr": { 807 | "prefix": "tr", 808 | "body": "$1$2", 809 | "description": "HTML - Defines a table row", 810 | "scope": "text.html" 811 | }, 812 | "track": { 813 | "prefix": "track", 814 | "body": "$5", 815 | "description": "HTML - Defines a table row", 816 | "scope": "text.html" 817 | }, 818 | "u": { 819 | "prefix": "u", 820 | "body": "$1$2", 821 | "description": "HTML - Used to define underlined text", 822 | "scope": "text.html" 823 | }, 824 | "ul": { 825 | "prefix": "ul", 826 | "body": [ 827 | "" 830 | ], 831 | "description": "HTML - Defines an unordered list", 832 | "scope": "text.html" 833 | }, 834 | "var": { 835 | "prefix": "var", 836 | "body": "$1$2", 837 | "description": "HTML - Defines a variable", 838 | "scope": "text.html" 839 | }, 840 | "video": { 841 | "prefix": "video", 842 | "body": [ 843 | "" 846 | ], 847 | "description": "HTML - Defines a video", 848 | "scope": "text.html" 849 | } 850 | } -------------------------------------------------------------------------------- /syntaxes/pyscript.tmLanguage.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pyscript", 3 | "scopeName": "text.html.pyscript", 4 | "fileTypes": [ 5 | "html" 6 | ], 7 | "firstLineMatch": "^{% extends [\"'][^\"']+[\"'] %}", 8 | "foldingStartMarker": "(<(?i:(head|table|tr|div|style|script|py-script|ul|ol|form|dl))\\b.*?>|{%\\s*(block|filter|for|if|macro|raw))", 9 | "foldingStopMarker": "(<\/(?i:(head|table|tr|div|style|script|py-script|ul|ol|form|dl))\\b.*?>|{%\\s*(endblock|endfilter|endfor|endif|endmacro|endraw)\\s*%})", 10 | "patterns": [ 11 | { 12 | "begin": "{#", 13 | "captures": [ 14 | { 15 | "name": "entity.other.django.delimiter.comment" 16 | } 17 | ], 18 | "end": "#}", 19 | "name": "comment.line.django" 20 | }, 21 | { 22 | "begin": "{% comment", 23 | "captures": [ 24 | { 25 | "name": "entity.other.django.delimiter.comment" 26 | } 27 | ], 28 | "end": "{% endcomment %}", 29 | "name": "comment.block.django" 30 | }, 31 | { 32 | "begin": "{{", 33 | "captures": [ 34 | { 35 | "name": "entity.other.django.delimiter.variable" 36 | } 37 | ], 38 | "end": "}}", 39 | "name": "meta.scope.django.variable", 40 | "patterns": [ 41 | { 42 | "include": "#expression" 43 | } 44 | ] 45 | }, 46 | { 47 | "begin": "{%", 48 | "captures": [ 49 | { 50 | "name": "entity.other.django.delimiter.tag" 51 | } 52 | ], 53 | "end": "%}", 54 | "name": "meta.scope.django.tag", 55 | "patterns": [ 56 | { 57 | "include": "#expression" 58 | } 59 | ] 60 | }, 61 | { 62 | "begin": "", 69 | "name": "meta.tag.pyscript", 70 | "patterns": [ 71 | { 72 | "include": "source.python" 73 | } 74 | ] 75 | }, 76 | { 77 | "begin": "", 84 | "name": "meta.tag.pyrel", 85 | "patterns": [ 86 | { 87 | "include": "source.python" 88 | } 89 | ] 90 | }, 91 | { 92 | "include": "text.html.basic" 93 | } 94 | ], 95 | "repository": { 96 | "escaped_char": { 97 | "match": "\\\\x[0-9A-F]{2}", 98 | "name": "constant.character.escape.hex.django" 99 | }, 100 | "escaped_unicode_char": { 101 | "captures": { 102 | "1": { 103 | "name": "constant.character.escape.unicode.16-bit-hex.django" 104 | }, 105 | "2": { 106 | "name": "constant.character.escape.unicode.32-bit-hex.django" 107 | }, 108 | "3": { 109 | "name": "constant.character.escape.unicode.name.django" 110 | } 111 | }, 112 | "match": "(\\\\U[0-9A-Fa-f]{8})|(\\\\u[0-9A-Fa-f]{4})|(\\\\N\\{[a-zA-Z ]+\\})" 113 | }, 114 | "expression": { 115 | "patterns": [ 116 | { 117 | "captures": { 118 | "1": { 119 | "name": "keyword.control.django" 120 | }, 121 | "2": { 122 | "name": "variable.other.django.block" 123 | } 124 | }, 125 | "match": "\\s*\\b(block)\\s+([a-zA-Z_][a-zA-Z0-9_]*)\\b" 126 | }, 127 | { 128 | "captures": { 129 | "1": { 130 | "name": "keyword.control.django" 131 | }, 132 | "2": { 133 | "name": "variable.other.django.filter" 134 | } 135 | }, 136 | "match": "\\s*\\b(filter)\\s+([a-zA-Z_][a-zA-Z0-9_]*)\\b" 137 | }, 138 | { 139 | "captures": { 140 | "1": { 141 | "name": "keyword.control.django" 142 | }, 143 | "2": { 144 | "name": "variable.other.django.test" 145 | } 146 | }, 147 | "match": "\\s*\\b(is)\\s+([a-zA-Z_][a-zA-Z0-9_]*)\\b" 148 | }, 149 | { 150 | "captures": { 151 | "1": { 152 | "name": "keyword.control.django" 153 | } 154 | }, 155 | "match": "(?<=\\{\\%-|\\{\\%)\\s*\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b(?!\\s*[,=])" 156 | }, 157 | { 158 | "match": "\\b(and|else|if|in|import|not|or|with(out)?\\s+context)\\b", 159 | "name": "keyword.control.django" 160 | }, 161 | { 162 | "match": "\\b(true|false|none)\\b", 163 | "name": "constant.language.django" 164 | }, 165 | { 166 | "match": "\\b(loop|super|self|varargs|kwargs)\\b", 167 | "name": "variable.language.django" 168 | }, 169 | { 170 | "match": "[a-zA-Z_][a-zA-Z0-9_]*", 171 | "name": "variable.other.django" 172 | }, 173 | { 174 | "match": "(\\+|\\-|\\*\\*|\\*|\/\/|\/|%)", 175 | "name": "keyword.operator.arithmetic.django" 176 | }, 177 | { 178 | "captures": { 179 | "1": { 180 | "name": "punctuation.other.django" 181 | }, 182 | "2": { 183 | "name": "variable.other.django.filter" 184 | } 185 | }, 186 | "match": "(\\|)([a-zA-Z_][a-zA-Z0-9_]*)" 187 | }, 188 | { 189 | "captures": { 190 | "1": { 191 | "name": "punctuation.other.django" 192 | }, 193 | "2": { 194 | "name": "variable.other.django.attribute" 195 | } 196 | }, 197 | "match": "(\\.)([a-zA-Z_][a-zA-Z0-9_]*)" 198 | }, 199 | { 200 | "begin": "\\[", 201 | "captures": [ 202 | { 203 | "name": "punctuation.other.django" 204 | } 205 | ], 206 | "end": "\\]", 207 | "patterns": [ 208 | { 209 | "include": "#expression" 210 | } 211 | ] 212 | }, 213 | { 214 | "begin": "\\(", 215 | "captures": [ 216 | { 217 | "name": "punctuation.other.django" 218 | } 219 | ], 220 | "end": "\\)", 221 | "patterns": [ 222 | { 223 | "include": "#expression" 224 | } 225 | ] 226 | }, 227 | { 228 | "begin": "\\{", 229 | "captures": [ 230 | { 231 | "name": "punctuation.other.django" 232 | } 233 | ], 234 | "end": "\\}", 235 | "patterns": [ 236 | { 237 | "include": "#expression" 238 | } 239 | ] 240 | }, 241 | { 242 | "match": "(\\.|:|\\||,)", 243 | "name": "punctuation.other.django" 244 | }, 245 | { 246 | "match": "(==|<=|=>|<|>|!=)", 247 | "name": "keyword.operator.comparison.django" 248 | }, 249 | { 250 | "match": "=", 251 | "name": "keyword.operator.assignment.django" 252 | }, 253 | { 254 | "begin": "\"", 255 | "beginCaptures": [ 256 | { 257 | "name": "punctuation.definition.string.begin.django" 258 | } 259 | ], 260 | "end": "\"", 261 | "endCaptures": [ 262 | { 263 | "name": "punctuation.definition.string.end.django" 264 | } 265 | ], 266 | "name": "string.quoted.double.django", 267 | "patterns": [ 268 | { 269 | "include": "#string" 270 | } 271 | ] 272 | }, 273 | { 274 | "begin": "'", 275 | "beginCaptures": [ 276 | { 277 | "name": "punctuation.definition.string.begin.django" 278 | } 279 | ], 280 | "end": "'", 281 | "endCaptures": [ 282 | { 283 | "name": "punctuation.definition.string.end.django" 284 | } 285 | ], 286 | "name": "string.quoted.single.django", 287 | "patterns": [ 288 | { 289 | "include": "#string" 290 | } 291 | ] 292 | }, 293 | { 294 | "begin": "@\/", 295 | "beginCaptures": [ 296 | { 297 | "name": "punctuation.definition.regexp.begin.django" 298 | } 299 | ], 300 | "end": "\/", 301 | "endCaptures": [ 302 | { 303 | "name": "punctuation.definition.regexp.end.django" 304 | } 305 | ], 306 | "name": "string.regexp.django", 307 | "patterns": [ 308 | { 309 | "include": "#simple_escapes" 310 | } 311 | ] 312 | } 313 | ] 314 | }, 315 | "simple_escapes": { 316 | "captures": { 317 | "1": { 318 | "name": "constant.character.escape.newline.django" 319 | }, 320 | "10": { 321 | "name": "constant.character.escape.tab.django" 322 | }, 323 | "11": { 324 | "name": "constant.character.escape.vertical-tab.django" 325 | }, 326 | "2": { 327 | "name": "constant.character.escape.backlash.django" 328 | }, 329 | "3": { 330 | "name": "constant.character.escape.double-quote.django" 331 | }, 332 | "4": { 333 | "name": "constant.character.escape.single-quote.django" 334 | }, 335 | "5": { 336 | "name": "constant.character.escape.bell.django" 337 | }, 338 | "6": { 339 | "name": "constant.character.escape.backspace.django" 340 | }, 341 | "7": { 342 | "name": "constant.character.escape.formfeed.django" 343 | }, 344 | "8": { 345 | "name": "constant.character.escape.linefeed.django" 346 | }, 347 | "9": { 348 | "name": "constant.character.escape.return.django" 349 | } 350 | }, 351 | "match": "(\\\\\\n)|(\\\\\\\\)|(\\\\\\\")|(\\\\')|(\\\\a)|(\\\\b)|(\\\\f)|(\\\\n)|(\\\\r)|(\\\\t)|(\\\\v)" 352 | }, 353 | "string": { 354 | "patterns": [ 355 | { 356 | "include": "#simple_escapes" 357 | }, 358 | { 359 | "include": "#escaped_char" 360 | }, 361 | { 362 | "include": "#escaped_unicode_char" 363 | } 364 | ] 365 | } 366 | } 367 | } -------------------------------------------------------------------------------- /vsc-extension-quickstart.md: -------------------------------------------------------------------------------- 1 | # Welcome to your VS Code Extension 2 | 3 | ## What's in the folder 4 | 5 | * This folder contains all of the files necessary for your extension. 6 | * `package.json` - this is the manifest file in which you declare your language support and define the location of the grammar file that has been copied into your extension. 7 | * `syntaxes/pyscript.tmLanguage.json` - this is the Text mate grammar file that is used for tokenization. 8 | * `language-configuration.json` - this is the language configuration, defining the tokens that are used for comments and brackets. 9 | 10 | ## Get up and running straight away 11 | 12 | * Make sure the language configuration settings in `language-configuration.json` are accurate. 13 | * Press `F5` to open a new window with your extension loaded. 14 | * Create a new file with a file name suffix matching your language. 15 | * Verify that syntax highlighting works and that the language configuration settings are working. 16 | 17 | ## Make changes 18 | 19 | * You can relaunch the extension from the debug toolbar after making changes to the files listed above. 20 | * You can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes. 21 | 22 | ## Add more language features 23 | 24 | * To add features such as intellisense, hovers and validators check out the VS Code extenders documentation at https://code.visualstudio.com/docs 25 | 26 | ## Install your extension 27 | 28 | * To start using your extension with Visual Studio Code copy it into the `/.vscode/extensions` folder and restart Code. 29 | * To share your extension with the world, read on https://code.visualstudio.com/docs about publishing an extension. 30 | --------------------------------------------------------------------------------