Change language-id for manifest.yml files
This commit is contained in:
@@ -40,7 +40,8 @@ export function activate(context: VSCode.ExtensionContext) {
|
||||
// events pass on to Language Server only for documents for which function passed via textDocumentFilter property return true
|
||||
|
||||
// TODO: Remove <any> cast ones https://github.com/Microsoft/vscode-languageserver-node/issues/9 is resolved
|
||||
documentSelector: [ <any> {language: 'yaml', pattern: '**/manifest*.yml'}],
|
||||
documentSelector: ["manifest-yaml"],
|
||||
// documentSelector: [ <any> {language: 'yaml', pattern: '**/manifest*.yml'}],
|
||||
synchronize: {
|
||||
// TODO: Remove textDocumentFilter property once https://github.com/Microsoft/vscode-languageserver-node/issues/9 is resolved
|
||||
textDocumentFilter: function(textDocument : TextDocument) : boolean {
|
||||
|
||||
@@ -24,8 +24,27 @@
|
||||
"manifest.yml"
|
||||
],
|
||||
"activationEvents": [
|
||||
"onLanguage:yaml"
|
||||
"onLanguage:manifest-yaml"
|
||||
],
|
||||
"contributes": {
|
||||
"languages": [
|
||||
{
|
||||
"id": "manifest-yaml",
|
||||
"aliases": [
|
||||
"cloudfoundry-manifest"
|
||||
],
|
||||
"filenamePatterns": [
|
||||
"*manifest*.yml"
|
||||
],
|
||||
"configuration": "./yaml-support/language-configuration.json"
|
||||
}
|
||||
],
|
||||
"grammars": [{
|
||||
"language": "manifest-yaml",
|
||||
"scopeName": "source.yaml",
|
||||
"path": "./yaml-support/yaml.tmLanguage"
|
||||
}]
|
||||
},
|
||||
"main": "./out/lib/Main",
|
||||
"scripts": {
|
||||
"prepublish": "tsc -p .",
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
# Download yaml TextMate grammar
|
||||
curl https://raw.githubusercontent.com/textmate/yaml.tmbundle/master/Syntaxes/YAML.tmLanguage > yaml-support/yaml.tmLanguage
|
||||
|
||||
# Preinstall commons-vscode package
|
||||
(cd ../commons-vscode ; npm install)
|
||||
npm install ../commons-vscode
|
||||
|
||||
# Use maven to build fat jar of the language server
|
||||
../mvnw -U -f ../pom.xml -pl vscode-manifest-yaml -am clean install
|
||||
|
||||
|
||||
1
vscode-extensions/vscode-manifest-yaml/yaml-support/.gitignore
vendored
Normal file
1
vscode-extensions/vscode-manifest-yaml/yaml-support/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
yaml.tmLanguage
|
||||
@@ -0,0 +1,28 @@
|
||||
// ATTENTION - THIS DIRECTORY CONTAINS THIRD PARTY OPEN SOURCE MATERIALS:
|
||||
|
||||
[{
|
||||
"name": "textmate/yaml.tmbundle",
|
||||
"version": "0.0.0",
|
||||
"license": "TextMate Bundle License",
|
||||
"repositoryURL": "https://github.com/textmate/yaml.tmbundle",
|
||||
"licenseDetail": [
|
||||
"Copyright (c) 2015 FichteFoll <fichtefoll2@googlemail.com>",
|
||||
"",
|
||||
"Permission is hereby granted, free of charge, to any person obtaining a copy",
|
||||
"of this software and associated documentation files (the \"Software\"), to deal",
|
||||
"in the Software without restriction, including without limitation the rights",
|
||||
"to use, copy, modify, merge, publish, distribute, sublicense, and/or sell",
|
||||
"copies of the Software, and to permit persons to whom the Software is",
|
||||
"furnished to do so, subject to the following conditions:",
|
||||
"",
|
||||
"The above copyright notice and this permission notice shall be included in all",
|
||||
"copies or substantial portions of the Software.",
|
||||
"",
|
||||
"THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR",
|
||||
"IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,",
|
||||
"FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE",
|
||||
"AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER",
|
||||
"LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,",
|
||||
"OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."
|
||||
]
|
||||
}]
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"comments": {
|
||||
"lineComment": "#"
|
||||
},
|
||||
"brackets": [
|
||||
["{", "}"],
|
||||
["[", "]"],
|
||||
["(", ")"]
|
||||
],
|
||||
"autoClosingPairs": [
|
||||
["{", "}"],
|
||||
["[", "]"],
|
||||
["(", ")"],
|
||||
["\"", "\""],
|
||||
["'", "'"]
|
||||
],
|
||||
"surroundingPairs": [
|
||||
["{", "}"],
|
||||
["[", "]"],
|
||||
["(", ")"],
|
||||
["\"", "\""],
|
||||
["'", "'"]
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user