Bläddra i källkod

added first vscode extension version

Matheus Giovani 3 år sedan
förälder
incheckning
eed8c3ad2e

+ 18 - 0
packages/vscode-extension/pupper-js/.vscode/launch.json

@@ -0,0 +1,18 @@
+// A launch configuration that launches the extension inside a new window
+// Use IntelliSense to learn about possible attributes.
+// Hover to view descriptions of existing attributes.
+// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
+{
+	"version": "0.2.0",
+    "configurations": [
+        {
+            "name": "Extension",
+            "type": "extensionHost",
+            "request": "launch",
+            "args": [
+                "${workspaceFolder}/test/test.pupper",
+                "--extensionDevelopmentPath=${workspaceFolder}"
+            ]
+        }
+    ]
+}

+ 4 - 0
packages/vscode-extension/pupper-js/.vscodeignore

@@ -0,0 +1,4 @@
+.vscode/**
+.vscode-test/**
+.gitignore
+vsc-extension-quickstart.md

+ 9 - 0
packages/vscode-extension/pupper-js/CHANGELOG.md

@@ -0,0 +1,9 @@
+# Change Log
+
+All notable changes to the "pupper-js" extension will be documented in this file.
+
+Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
+
+## [Unreleased]
+
+- Initial release

+ 65 - 0
packages/vscode-extension/pupper-js/README.md

@@ -0,0 +1,65 @@
+# pupper-js README
+
+This is the README for your extension "pupper-js". After writing up a brief description, we recommend including the following sections.
+
+## Features
+
+Describe specific features of your extension including screenshots of your extension in action. Image paths are relative to this README file.
+
+For example if there is an image subfolder under your extension project workspace:
+
+\!\[feature X\]\(images/feature-x.png\)
+
+> Tip: Many popular extensions utilize animations. This is an excellent way to show off your extension! We recommend short, focused animations that are easy to follow.
+
+## Requirements
+
+If you have any requirements or dependencies, add a section describing those and how to install and configure them.
+
+## Extension Settings
+
+Include if your extension adds any VS Code settings through the `contributes.configuration` extension point.
+
+For example:
+
+This extension contributes the following settings:
+
+* `myExtension.enable`: enable/disable this extension
+* `myExtension.thing`: set to `blah` to do something
+
+## Known Issues
+
+Calling out known issues can help limit users opening duplicate issues against your extension.
+
+## Release Notes
+
+Users appreciate release notes as you update your extension.
+
+### 1.0.0
+
+Initial release of ...
+
+### 1.0.1
+
+Fixed issue #.
+
+### 1.1.0
+
+Added features X, Y, and Z.
+
+-----------------------------------------------------------------------------------------------------------
+
+## Working with Markdown
+
+**Note:** You can author your README using Visual Studio Code.  Here are some useful editor keyboard shortcuts:
+
+* Split the editor (`Cmd+\` on macOS or `Ctrl+\` on Windows and Linux)
+* Toggle preview (`Shift+CMD+V` on macOS or `Shift+Ctrl+V` on Windows and Linux)
+* Press `Ctrl+Space` (Windows, Linux) or `Cmd+Space` (macOS) to see a list of Markdown snippets
+
+### For more information
+
+* [Visual Studio Code's Markdown Support](http://code.visualstudio.com/docs/languages/markdown)
+* [Markdown Syntax Reference](https://help.github.com/articles/markdown-basics/)
+
+**Enjoy!**

BIN
packages/vscode-extension/pupper-js/assets/icon.png


+ 31 - 0
packages/vscode-extension/pupper-js/language-configuration.json

@@ -0,0 +1,31 @@
+{
+    "comments": {
+        // symbol used for single line comment. Remove this entry if your language does not support line comments
+        "lineComment": "//-"
+    },
+    // symbols used as brackets
+    "brackets": [
+        ["{", "}"],
+        ["[", "]"],
+        ["(", ")"]
+    ],
+    // symbols that are auto closed when typing
+    "autoClosingPairs": [
+        ["{", "}"],
+        ["[", "]"],
+        ["(", ")"],
+        ["\"", "\""],
+        ["'", "'"]
+    ],
+    // symbols that can be used to surround a selection
+    "surroundingPairs": [
+        ["{", "}"],
+        ["[", "]"],
+        ["(", ")"],
+        ["\"", "\""],
+        ["'", "'"]
+    ],
+    "folding": {
+		"offSide": true
+	}
+}

+ 29 - 0
packages/vscode-extension/pupper-js/package.json

@@ -0,0 +1,29 @@
+{
+    "name": "pupper-js",
+    "displayName": "Pupper.js",
+    "description": "",
+    "version": "0.0.1",
+    "engines": {
+        "vscode": "^1.46.0"
+    },
+    "categories": [
+        "Programming Languages"
+    ],
+    "contributes": {
+        "languages": [{
+            "id": "pupper",
+            "aliases": ["Pupper.js", "pupper"],
+            "extensions": [".pupper"],
+            "configuration": "./language-configuration.json",
+            "icon": {
+                "dark": "./assets/icon.png",
+                "light": "./assets/icon.png"
+            }
+        }],
+        "grammars": [{
+            "language": "pupper",
+            "scopeName": "source.pupper",
+            "path": "./syntaxes/pupper.tmLanguage.json"
+        }]
+    }
+}

+ 1059 - 0
packages/vscode-extension/pupper-js/syntaxes/pupper.tmLanguage.json

@@ -0,0 +1,1059 @@
+{
+    "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
+    "information_for_contributors": [
+        "This file has been converted from https://github.com/davidrios/pug-tmbundle/blob/master/Syntaxes/Pug.JSON-tmLanguage",
+        "If you want to provide a fix or improvement, please create a pull request against the original repository.",
+        "Once accepted there, we are happy to receive an update request."
+    ],
+    "name": "Pupper.js",
+    "scopeName": "source.pupper",
+    "patterns": [
+        {
+            "begin": "^(\\s*)//-",
+            "end": "^(?!(\\1\\s)|\\s*$)",
+            "name": "comment.unbuffered.block.pug",
+            "comment": "Unbuffered (pug-only) comments."
+        },
+        {
+            "begin": "^(\\s*)//",
+            "end": "^(?!(\\1\\s)|\\s*$)",
+            "name": "string.comment.buffered.block.pug",
+            "comment": "Buffered (html) comments.",
+            "patterns": [
+                {
+                    "captures": {
+                        "1": {
+                            "name": "invalid.illegal.comment.comment.block.pug"
+                        }
+                    },
+                    "match": "^\\s*(//)(?!-)",
+                    "name": "string.comment.buffered.block.pug",
+                    "comment": "Buffered comments inside buffered comments will generate invalid html."
+                }
+            ]
+        },
+        {
+            "begin": "<!--",
+            "end": "--\\s*>",
+            "name": "comment.unbuffered.block.pug",
+            "patterns": [
+                {
+                    "match": "--",
+                    "name": "invalid.illegal.comment.comment.block.pug"
+                }
+            ]
+        },
+        {
+            "begin": "^(\\s*)(script)",
+            "beginCaptures": {
+                "2": {
+                    "name": "entity.name.tag.pug"
+                }
+            },
+            "end": "^(?!(\\1\\s)|\\s*$)(:[\\S]+?$)?",
+            "name": "meta.tag.other",
+            "comment": "Script tag with JavaScript code.",
+            "patterns": [
+                {
+                    "begin": "\\G(?=\\()",
+                    "end": "$",
+                    "patterns": [
+                        {
+                            "include": "#tag_attributes"
+                        }
+                    ]
+                },
+                {
+                    "begin": "\\G(?=[.#])",
+                    "end": "$",
+                    "patterns": [
+                        {
+                            "include": "#complete_tag"
+                        }
+                    ]
+                },
+				{
+                    "begin": ".+:(ts|typescript)",
+                    "end": "$",
+                    "patterns": [
+                        {
+                            "include": "source.ts"
+                        }
+                    ]
+                },
+                {
+                    "include": "source.js"
+                }
+            ]
+        },
+        {
+            "begin": "^(\\s*)(style)",
+            "beginCaptures": {
+                "2": {
+                    "name": "entity.name.tag.pug"
+                }
+            },
+            "end": "^(?!(\\1\\s)|\\s*$)",
+            "name": "meta.tag.other",
+            "comment": "Style tag with CSS code.",
+            "patterns": [
+                {
+                    "begin": "\\G(?=\\()",
+                    "end": "$",
+                    "patterns": [
+                        {
+                            "include": "#tag_attributes"
+                        }
+                    ]
+                },
+                {
+                    "begin": "\\G(?=[.#])",
+                    "end": "$",
+                    "patterns": [
+                        {
+                            "include": "#complete_tag"
+                        }
+                    ]
+                },
+                {
+                    "include": "source.css"
+                }
+            ]
+        },
+		{
+            "begin": "^(\\s*)(import)\\s*\\((\\S+)\\s+(from)\\s+((['\"])(.+?)\\6)\\)",
+            "beginCaptures": {
+                "2": {
+                    "name": "entity.name.tag.pug"
+                },
+				"3": {
+					"name": "keyword.control"
+				},
+				"5": {
+					"name": "string"
+				}
+            },
+            "end": "^(?!(\\1\\s)|\\s*$)",
+            "name": "meta.tag.other",
+            "comment": "Import tag.",
+            "patterns": [
+                {
+                    "begin": "\\G(?=\\()",
+                    "end": "$",
+                    "patterns": [
+                        {
+                            "include": "#tag_attributes"
+                        }
+                    ]
+                },
+                {
+                    "begin": "\\G(?=[.#])",
+                    "end": "$",
+                    "patterns": [
+                        {
+                            "include": "#complete_tag"
+                        }
+                    ]
+                },
+                {
+                    "include": "source.css"
+                }
+            ]
+        },
+        {
+            "begin": "^(\\s*)(?=[\\w.#].*?\\.$)(?=(?:(?:(?:(?:(?:#[\\w-]+)|(?:\\.[\\w-]+))|(?:(?:[#!]\\{[^}]*\\})|(?:\\w(?:(?:[\\w:-]+[\\w-])|(?:[\\w-]*)))))(?:(?:#[\\w-]+)|(?:\\.[\\w-]+)|(?:\\((?:[^()\\'\\\"]*(?:(?:\\'(?:[^\\']|(?:(?<!\\\\)\\\\\\'))*\\')|(?:\\\"(?:[^\\\"]|(?:(?<!\\\\)\\\\\\\"))*\\\")))*[^()]*\\))*)*)(?:(?:(?::\\s+)|(?<=\\)))(?:(?:(?:(?:#[\\w-]+)|(?:\\.[\\w-]+))|(?:(?:[#!]\\{[^}]*\\})|(?:\\w(?:(?:[\\w:-]+[\\w-])|(?:[\\w-]*)))))(?:(?:#[\\w-]+)|(?:\\.[\\w-]+)|(?:\\((?:[^()\\'\\\"]*(?:(?:\\'(?:[^\\']|(?:(?<!\\\\)\\\\\\'))*\\')|(?:\\\"(?:[^\\\"]|(?:(?<!\\\\)\\\\\\\"))*\\\")))*[^()]*\\))*)*))*)\\.$)(?:(?:(#[\\w-]+)|(\\.[\\w-]+))|((?:[#!]\\{[^}]*\\})|(?:\\w(?:(?:[\\w:-]+[\\w-])|(?:[\\w-]*)))))",
+            "beginCaptures": {
+                "2": {
+                    "name": "entity.other.attribute-name.id.pug"
+                },
+                "3": {
+                    "name": "entity.other.attribute-name.class.pug"
+                },
+                "4": {
+                    "name": "meta.tag.other entity.name.tag.pug"
+                }
+            },
+            "end": "^(?!(\\1\\s)|\\s*$)",
+            "comment": "Generated from dot_block_tag.py",
+            "patterns": [
+                {
+                    "include": "#tag_attributes"
+                },
+                {
+                    "include": "#complete_tag"
+                },
+                {
+                    "begin": "^(?=.)",
+                    "end": "$",
+                    "name": "text.block.pug",
+                    "patterns": [
+                        {
+                            "include": "#inline_pug"
+                        },
+                        {
+                            "include": "#embedded_html"
+                        },
+                        {
+                            "include": "#html_entity"
+                        },
+                        {
+                            "include": "#interpolated_value"
+                        },
+                        {
+                            "include": "#interpolated_error"
+                        },
+                        {
+                            "include": "#vue-interpolations"
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "begin": "^\\s*",
+            "end": "$",
+            "comment": "All constructs that generally span a single line starting with any number of white-spaces.",
+            "patterns": [
+                {
+                    "include": "#inline_pug"
+                },
+                {
+                    "include": "#blocks_and_includes"
+                },
+                {
+                    "include": "#unbuffered_code"
+                },
+                {
+                    "include": "#mixin_definition"
+                },
+                {
+                    "include": "#mixin_call"
+                },
+                {
+                    "include": "#flow_control"
+                },
+                {
+                    "include": "#case_conds"
+                },
+                {
+                    "begin": "\\|",
+                    "end": "$",
+                    "name": "text.block.pipe.pug",
+                    "comment": "Tag pipe text line.",
+                    "patterns": [
+                        {
+                            "include": "#inline_pug"
+                        },
+                        {
+                            "include": "#embedded_html"
+                        },
+                        {
+                            "include": "#html_entity"
+                        },
+                        {
+                            "include": "#interpolated_value"
+                        },
+                        {
+                            "include": "#interpolated_error"
+                        },
+                        {
+                            "include": "#vue-interpolations"
+                        }
+                    ]
+                },
+                {
+                    "include": "#printed_expression"
+                },
+                {
+                    "begin": "\\G(?=(#[^\\{\\w-])|[^\\w.#])",
+                    "end": "$",
+                    "comment": "Line starting with characters incompatible with tag name/id/class is standalone text.",
+                    "patterns": [
+                        {
+                            "begin": "</?(?=[!#])",
+                            "end": ">|$",
+                            "patterns": [
+                                {
+                                    "include": "#inline_pug"
+                                },
+                                {
+                                    "include": "#interpolated_value"
+                                },
+                                {
+                                    "include": "#interpolated_error"
+                                },
+                                {
+                                    "include": "#vue-interpolations"
+                                }
+                            ]
+                        },
+                        {
+                            "include": "#inline_pug"
+                        },
+                        {
+                            "include": "#embedded_html"
+                        },
+                        {
+                            "include": "#html_entity"
+                        },
+                        {
+                            "include": "#interpolated_value"
+                        },
+                        {
+                            "include": "#interpolated_error"
+                        },
+                        {
+                            "include": "#vue-interpolations"
+                        }
+                    ]
+                },
+                {
+                    "include": "#complete_tag"
+                }
+            ]
+        },
+        {
+            "include": "#vue-interpolations"
+        },
+        {
+            "include": "#vue-directives"
+        }
+    ],
+    "repository": {
+        "blocks_and_includes": {
+            "captures": {
+                "1": {
+                    "name": "storage.type.import.include.pug"
+                },
+                "4": {
+                    "name": "variable.control.import.include.pug"
+                }
+            },
+            "match": "(extends|include|yield|append|prepend|block( (append|prepend))?)\\s+(.*)$",
+            "name": "meta.first-class.pug",
+            "comment": "Template blocks and includes."
+        },
+        "unbuffered_code": {
+            "begin": "(-|(([a-zA-Z0-9_]+)\\s+=))",
+            "beginCaptures": {
+                "3": {
+                    "name": "variable.parameter.javascript.embedded.pug"
+                }
+            },
+            "end": "(?=\\])|(({\\s*)?$)",
+            "name": "source.js",
+            "comment": "name = function() {}",
+            "patterns": [
+                {
+                    "include": "#js_brackets"
+                },
+                {
+                    "include": "#babel_parens"
+                },
+                {
+                    "include": "source.js"
+                }
+            ]
+        },
+        "mixin_definition": {
+            "match": "(mixin\\s+)([\\w-]+)(?:(\\()\\s*((?:[a-zA-Z_]\\w*\\s*)(?:,\\s*[a-zA-Z_]\\w*\\s*)*)(\\)))?$",
+            "captures": {
+                "1": {
+                    "name": "storage.type.function.pug"
+                },
+                "2": {
+                    "name": "meta.tag.other entity.name.function.pug"
+                },
+                "3": {
+                    "name": "punctuation.definition.parameters.begin.js"
+                },
+                "4": {
+                    "name": "variable.parameter.function.js"
+                },
+                "5": {
+                    "name": "punctuation.definition.parameters.begin.js"
+                }
+            }
+        },
+        "mixin_call": {
+            "begin": "((?:mixin\\s+)|\\+)([\\w-]+)",
+            "beginCaptures": {
+                "1": {
+                    "name": "storage.type.function.pug"
+                },
+                "2": {
+                    "name": "meta.tag.other entity.name.function.pug"
+                }
+            },
+            "end": "(?!\\()|$",
+            "patterns": [
+                {
+                    "begin": "(?<!\\))\\(",
+                    "end": "\\)",
+                    "name": "args.mixin.pug",
+                    "patterns": [
+                        {
+                            "include": "#js_parens"
+                        },
+                        {
+                            "include": "#string"
+                        },
+                        {
+                            "match": "([^\\s(),=/]+)\\s*=\\s*",
+                            "captures": {
+                                "1": {
+                                    "name": "meta.tag.other entity.other.attribute-name.tag.pug"
+                                }
+                            }
+                        },
+                        {
+                            "include": "source.js"
+                        }
+                    ]
+                },
+                {
+                    "include": "#tag_attributes"
+                }
+            ]
+        },
+        "flow_control": {
+            "begin": "(for|if|else if|else|each|until|while|unless|case)(\\s+|$)",
+            "captures": {
+                "1": {
+                    "name": "storage.type.function.pug"
+                }
+            },
+            "end": "$",
+            "name": "meta.control.flow.pug",
+            "comment": "Pug control flow.",
+            "patterns": [
+                {
+                    "begin": "",
+                    "end": "$",
+                    "name": "js.embedded.control.flow.pug",
+                    "patterns": [
+                        {
+                            "include": "source.js"
+                        }
+                    ]
+                }
+            ]
+        },
+        "case_when_paren": {
+            "begin": "\\(",
+            "end": "\\)",
+            "name": "js.when.control.flow.pug",
+            "patterns": [
+                {
+                    "include": "#case_when_paren"
+                },
+                {
+                    "match": ":",
+                    "name": "invalid.illegal.name.tag.pug"
+                },
+                {
+                    "include": "source.js"
+                }
+            ]
+        },
+        "case_conds": {
+            "begin": "(default|when)((\\s+|(?=:))|$)",
+            "captures": {
+                "1": {
+                    "name": "storage.type.function.pug"
+                }
+            },
+            "end": "$",
+            "name": "meta.control.flow.pug",
+            "comment": "Pug case conditionals.",
+            "patterns": [
+                {
+                    "begin": "\\G(?!:)",
+                    "end": "(?=:\\s+)|$",
+                    "name": "js.embedded.control.flow.pug",
+                    "patterns": [
+                        {
+                            "include": "#case_when_paren"
+                        },
+                        {
+                            "include": "source.js"
+                        }
+                    ]
+                },
+                {
+                    "begin": ":\\s+",
+                    "end": "$",
+                    "name": "tag.case.control.flow.pug",
+                    "patterns": [
+                        {
+                            "include": "#complete_tag"
+                        }
+                    ]
+                }
+            ]
+        },
+        "complete_tag": {
+            "begin": "(?=[\\w.#])|(:\\s*)",
+            "end": "(\\.?$)|(?=:.)",
+            "patterns": [
+                {
+                    "include": "#blocks_and_includes"
+                },
+                {
+                    "include": "#unbuffered_code"
+                },
+                {
+                    "include": "#mixin_call"
+                },
+                {
+                    "include": "#flow_control"
+                },
+                {
+                    "match": "(?<=:)\\w.*$",
+                    "name": "invalid.illegal.name.tag.pug"
+                },
+                {
+                    "include": "#tag_name"
+                },
+                {
+                    "include": "#tag_id"
+                },
+                {
+                    "include": "#tag_classes"
+                },
+                {
+                    "include": "#tag_attributes"
+                },
+                {
+                    "include": "#tag_mixin_attributes"
+                },
+                {
+                    "match": "((\\.)\\s+$)|((:)\\s*$)",
+                    "captures": {
+                        "2": {
+                            "name": "invalid.illegal.end.tag.pug"
+                        },
+                        "4": {
+                            "name": "invalid.illegal.end.tag.pug"
+                        }
+                    }
+                },
+                {
+                    "include": "#printed_expression"
+                },
+                {
+                    "include": "#tag_text"
+                }
+            ]
+        },
+        "tag_name": {
+            "begin": "([#!]\\{(?=.*?\\}))|(\\w(([\\w:-]+[\\w-])|([\\w-]*)))",
+            "end": "(\\G(?<!\\5[^\\w-]))|\\}|$",
+            "name": "meta.tag.other entity.name.tag.pug",
+            "patterns": [
+                {
+                    "begin": "\\G(?<=\\{)",
+                    "end": "(?=\\})",
+                    "name": "meta.tag.other entity.name.tag.pug",
+                    "patterns": [
+                        {
+                            "match": "{",
+                            "name": "invalid.illegal.tag.pug"
+                        },
+                        {
+                            "include": "source.js"
+                        }
+                    ]
+                }
+            ]
+        },
+        "tag_id": {
+            "match": "#[\\w-]+",
+            "name": "entity.other.attribute-name.id.pug"
+        },
+        "tag_classes": {
+            "match": "\\.([^\\w-])?[\\w-]*",
+            "captures": {
+                "1": {
+                    "name": "invalid.illegal.tag.pug"
+                }
+            },
+            "name": "entity.other.attribute-name.class.pug"
+        },
+        "tag_attributes": {
+            "begin": "(\\(\\s*)",
+            "captures": {
+                "1": {
+                    "name": "constant.name.attribute.tag.pug"
+                }
+            },
+            "end": "(\\))",
+            "name": "meta.tag.other",
+            "patterns": [
+                {
+                    "include": "#tag_attribute_name_paren"
+                },
+                {
+                    "include": "#vue-directives"
+                },
+                {
+                    "include": "#tag_attribute_name"
+                },
+                {
+                    "match": "!(?!=)",
+                    "name": "invalid.illegal.tag.pug"
+                },
+                {
+                    "begin": "=\\s*",
+                    "end": "$|(?=,|(?:\\s+[^!%&*-+~|<>:?/])|\\))",
+                    "name": "attribute_value",
+                    "patterns": [
+                        {
+                            "include": "#string"
+                        },
+                        {
+                            "include": "#js_parens"
+                        },
+                        {
+                            "include": "#js_brackets"
+                        },
+                        {
+                            "include": "#js_braces"
+                        },
+                        {
+                            "include": "source.js"
+                        }
+                    ]
+                },
+                {
+                    "begin": "(?<=[%&*-+~|<>:?/])\\s+",
+                    "end": "$|(?=,|(?:\\s+[^!%&*-+~|<>:?/])|\\))",
+                    "name": "attribute_value2",
+                    "patterns": [
+                        {
+                            "include": "#string"
+                        },
+                        {
+                            "include": "#js_parens"
+                        },
+                        {
+                            "include": "#js_brackets"
+                        },
+                        {
+                            "include": "#js_braces"
+                        },
+                        {
+                            "include": "source.js"
+                        }
+                    ]
+                }
+            ]
+        },
+        "tag_attribute_name": {
+            "match": "([^\\s(),=/!]+)\\s*",
+            "captures": {
+                "1": {
+                    "name": "entity.other.attribute-name.tag.pug"
+                }
+            }
+        },
+        "tag_attribute_name_paren": {
+            "begin": "\\(\\s*",
+            "end": "\\)",
+            "name": "entity.other.attribute-name.tag.pug",
+            "patterns": [
+                {
+                    "include": "#tag_attribute_name_paren"
+                },
+                {
+                    "include": "#tag_attribute_name"
+                }
+            ]
+        },
+        "tag_mixin_attributes": {
+            "begin": "(&attributes\\()",
+            "captures": {
+                "1": {
+                    "name": "entity.name.function.pug"
+                }
+            },
+            "end": "(\\))",
+            "name": "meta.tag.other",
+            "patterns": [
+                {
+                    "match": "attributes(?=\\))",
+                    "name": "storage.type.keyword.pug"
+                },
+                {
+                    "include": "source.js"
+                }
+            ]
+        },
+        "tag_text": {
+            "begin": "(?=.)",
+            "end": "$",
+            "patterns": [
+                {
+                    "include": "#inline_pug"
+                },
+                {
+                    "include": "#embedded_html"
+                },
+                {
+                    "include": "#html_entity"
+                },
+                {
+                    "include": "#interpolated_value"
+                },
+                {
+                    "include": "#interpolated_error"
+                },
+                {
+                    "include": "#vue-interpolations"
+                }
+            ]
+        },
+        "inline_pug_text": {
+            "begin": "",
+            "end": "(?=\\])",
+            "patterns": [
+                {
+                    "begin": "\\[",
+                    "end": "\\]",
+                    "patterns": [
+                        {
+                            "include": "#inline_pug_text"
+                        }
+                    ]
+                },
+                {
+                    "include": "#inline_pug"
+                },
+                {
+                    "include": "#embedded_html"
+                },
+                {
+                    "include": "#html_entity"
+                },
+                {
+                    "include": "#interpolated_value"
+                },
+                {
+                    "include": "#interpolated_error"
+                },
+                {
+                    "include": "#vue-interpolations"
+                }
+            ]
+        },
+        "inline_pug": {
+            "begin": "(?<!\\\\)(#\\[)",
+            "captures": {
+                "1": {
+                    "name": "entity.name.function.pug"
+                },
+                "2": {
+                    "name": "entity.name.function.pug"
+                }
+            },
+            "end": "(\\])",
+            "name": "inline.pug",
+            "patterns": [
+                {
+                    "include": "#inline_pug"
+                },
+                {
+                    "include": "#mixin_call"
+                },
+                {
+                    "begin": "(?<!\\])(?=[\\w.#])|(:\\s*)",
+                    "end": "(?=\\]|(:.)|=|\\s)",
+                    "name": "tag.inline.pug",
+                    "patterns": [
+                        {
+                            "include": "#tag_name"
+                        },
+                        {
+                            "include": "#tag_id"
+                        },
+                        {
+                            "include": "#tag_classes"
+                        },
+                        {
+                            "include": "#tag_attributes"
+                        },
+                        {
+                            "include": "#tag_mixin_attributes"
+                        },
+                        {
+                            "include": "#inline_pug"
+                        },
+                        {
+                            "match": "\\[",
+                            "name": "invalid.illegal.tag.pug"
+                        }
+                    ]
+                },
+                {
+                    "include": "#unbuffered_code"
+                },
+                {
+                    "include": "#printed_expression"
+                },
+                {
+                    "match": "\\[",
+                    "name": "invalid.illegal.tag.pug"
+                },
+                {
+                    "include": "#inline_pug_text"
+                }
+            ]
+        },
+        "html_entity": {
+            "patterns": [
+                {
+                    "match": "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)",
+                    "name": "constant.character.entity.html.text.pug"
+                },
+                {
+                    "match": "[<>&]",
+                    "name": "invalid.illegal.html_entity.text.pug"
+                }
+            ]
+        },
+        "interpolated_value": {
+            "begin": "(?<!\\\\)[#!]\\{(?=.*?\\})",
+            "end": "\\}",
+            "name": "string.interpolated.pug",
+            "patterns": [
+                {
+                    "match": "{",
+                    "name": "invalid.illegal.tag.pug"
+                },
+                {
+                    "include": "source.js"
+                }
+            ]
+        },
+        "interpolated_error": {
+            "match": "(?<!\\\\)[#!]\\{(?=[^}]*$)",
+            "name": "invalid.illegal.tag.pug"
+        },
+        "printed_expression": {
+            "begin": "(!?\\=)\\s*",
+            "captures": {
+                "1": {
+                    "name": "constant"
+                }
+            },
+            "end": "(?=\\])|$",
+            "name": "source.js",
+            "patterns": [
+                {
+                    "include": "#js_brackets"
+                },
+                {
+                    "include": "source.js"
+                }
+            ]
+        },
+        "string": {
+            "begin": "(['\"])",
+            "end": "(?<!\\\\)\\1",
+            "name": "string.quoted.pug",
+            "patterns": [
+                {
+                    "match": "\\\\((x[0-9a-fA-F]{2})|(u[0-9]{4})|.)",
+                    "name": "constant.character.quoted.pug"
+                },
+                {
+                    "include": "#interpolated_value"
+                },
+                {
+                    "include": "#interpolated_error"
+                },
+                {
+                    "include": "#vue-interpolations"
+                }
+            ]
+        },
+        "embedded_html": {
+            "begin": "(?=<[^>]*>)",
+            "end": "$|(?=>)",
+            "name": "html",
+            "patterns": [
+                {
+                    "include": "text.html.basic"
+                },
+                {
+                    "include": "#interpolated_value"
+                },
+                {
+                    "include": "#interpolated_error"
+                },
+                {
+                    "include": "#vue-interpolations"
+                }
+            ]
+        },
+        "js_parens": {
+            "begin": "\\(",
+            "end": "\\)",
+            "patterns": [
+                {
+                    "include": "#js_parens"
+                },
+                {
+                    "include": "source.js"
+                }
+            ]
+        },
+        "js_brackets": {
+            "begin": "\\[",
+            "end": "\\]",
+            "patterns": [
+                {
+                    "include": "#js_brackets"
+                },
+                {
+                    "include": "source.js"
+                }
+            ]
+        },
+        "js_braces": {
+            "begin": "\\{",
+            "end": "\\}",
+            "patterns": [
+                {
+                    "include": "#js_braces"
+                },
+                {
+                    "include": "source.js"
+                }
+            ]
+        },
+        "babel_parens": {
+            "begin": "\\(",
+            "end": "\\)|(({\\s*)?$)",
+            "patterns": [
+                {
+                    "include": "#babel_parens"
+                },
+                {
+                    "include": "source.js"
+                }
+            ]
+        },
+        "vue-directives": {
+            "name": "meta.directive.vue",
+            "begin": "(?:\\b(v-)|(:|@|#))([a-zA-Z\\-_]+)(?:\\:([a-zA-Z\\-_]+))?(?:\\.([a-zA-Z\\-_]+))*\\s*(=)",
+            "end": "(?<='|\")|(?=[\\s<>`])",
+            "captures": {
+                "1": {
+                    "name": "entity.other.attribute-name.html"
+                },
+                "2": {
+                    "name": "punctuation.separator.key-value.html"
+                },
+                "3": {
+                    "name": "entity.other.attribute-name.html"
+                },
+                "4": {
+                    "name": "entity.other.attribute-name.html"
+                },
+                "5": {
+                    "name": "entity.other.attribute-name.html"
+                },
+                "6": {
+                    "name": "punctuation.separator.key-value.html"
+                }
+            },
+            "patterns": [
+                {
+                    "name": "source.directive.vue",
+                    "begin": "`",
+                    "beginCaptures": {
+                        "0": {
+                            "name": "punctuation.definition.string.begin.html"
+                        }
+                    },
+                    "end": "`",
+                    "endCaptures": {
+                        "0": {
+                            "name": "punctuation.definition.string.end.html"
+                        }
+                    },
+                    "patterns": [
+                        {
+                            "include": "source.js#expression"
+                        }
+                    ]
+                },
+                {
+                    "name": "source.directive.vue",
+                    "begin": "\"",
+                    "beginCaptures": {
+                        "0": {
+                            "name": "punctuation.definition.string.begin.html"
+                        }
+                    },
+                    "end": "\"",
+                    "endCaptures": {
+                        "0": {
+                            "name": "punctuation.definition.string.end.html"
+                        }
+                    },
+                    "patterns": [
+                        {
+                            "include": "source.js#expression"
+                        }
+                    ]
+                },
+                {
+                    "name": "source.directive.vue",
+                    "begin": "'",
+                    "beginCaptures": {
+                        "0": {
+                            "name": "punctuation.definition.string.begin.html"
+                        }
+                    },
+                    "end": "'",
+                    "endCaptures": {
+                        "0": {
+                            "name": "punctuation.definition.string.end.html"
+                        }
+                    },
+                    "patterns": [
+                        {
+                            "include": "source.js#expression"
+                        }
+                    ]
+                }
+            ]
+        },
+        "vue-interpolations": {
+            "patterns": [
+                {
+                    "name": "expression.embedded.vue",
+                    "begin": "\\{\\{\\{?",
+                    "beginCaptures": {
+                        "0": {
+                            "name": "punctuation.definition.generic.begin.html"
+                        }
+                    },
+                    "end": "\\}\\}\\}?",
+                    "endCaptures": {
+                        "0": {
+                            "name": "punctuation.definition.generic.end.html"
+                        }
+                    },
+                    "patterns": [
+                        {
+                            "include": "source.js#expression"
+                        }
+                    ]
+                }
+            ]
+        }
+    }
+}

+ 43 - 0
packages/vscode-extension/pupper-js/test/test.pupper

@@ -0,0 +1,43 @@
+style
+    .something {
+        color: white;
+    }
+
+style:sass
+    .something2 {
+        color: white;
+
+        &.poggers {
+            content: "You're my little pogchamp";
+        }
+    }
+
+script
+    export default defineComponent({
+        
+    })
+
+script:ts
+    interface ITest {
+
+    }
+
+script:typescript
+    enum ETest {
+
+    }
+
+template:html
+    <html>
+        <strong>Teste</strong>
+    </html>
+
+import(ImportedComponent from "test")
+
+template
+    ImportedComponent
+        template:slot-name
+            |Filling a slot inside a component
+
+    slot:slot-name
+        |Default slot content