Skip to content

Instantly share code, notes, and snippets.

@brpaz
Created February 12, 2023 11:02
Show Gist options
  • Save brpaz/c958354504ec78408927cf8082059db6 to your computer and use it in GitHub Desktop.
Save brpaz/c958354504ec78408927cf8082059db6 to your computer and use it in GitHub Desktop.
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Advanced Snippet for VSCocde Schema file",
"type": "object",
"additionalProperties": false,
"properties": {
"apiVersion": {
"type": "string"
},
"kind": {
"type": "string",
"enum": [
"Snippet"
]
},
"metadata": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
},
"required": [
"name"
]
},
"spec": {
"type": "object",
"properties": {
"body": {
"type": "string"
},
"conditions": {
"type": "object",
"properties": {
"language": {
"type": "string",
"enum": [
"abap",
"bat",
"bibtext",
"coffeescript",
"cpp",
"c",
"cuda-cpp",
"css",
"dockerfile",
"diff",
"fsharp",
"git-commit",
"git-rebase",
"go",
"groovy",
"handlebars",
"html",
"ini",
"java",
"javascript",
"json",
"less",
"lua",
"makefile",
"markdown",
"objective-c",
"objective-cpp",
"perl",
"php",
"plaintext",
"postiats",
"powershell",
"pug",
"python",
"r",
"razor",
"ruby",
"rust",
"scss",
"shaderlab",
"shellscript",
"sql",
"swift",
"typescript",
"vb",
"xml",
"yaml"
]
},
"filePatters": {
"type": "array",
"items": {
"type": "string"
}
},
"packages": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"format": {
"type": "string",
"enum": [
"npm",
"gomod"
]
}
},
"required": [
"name",
"format"
]
}
},
"workspaceRoots": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"language"
]
}
},
"required": [
"body",
"conditions"
]
}
},
"required": [
"apiVersion",
"kind",
"metadata",
"spec"
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment