Minimal Spring Factories support in Boot LS

This commit is contained in:
aboyko
2022-10-20 10:15:29 -04:00
parent 4618a07968
commit 0fb7e7daca
10 changed files with 243 additions and 3 deletions

View File

@@ -16,6 +16,7 @@ const PROPERTIES_LANGUAGE_ID = "spring-boot-properties";
const YAML_LANGUAGE_ID = "spring-boot-properties-yaml";
const JAVA_LANGUAGE_ID = "java";
const XML_LANGUAGE_ID = "xml";
const FACTORIES_LANGUAGE_ID = "spring-factories";
const NEVER_SHOW_AGAIN = "Do not show again";
@@ -93,6 +94,10 @@ export function activate(context: VSCode.ExtensionContext): Thenable<ExtensionAP
{
language: XML_LANGUAGE_ID,
scheme: 'file'
},
{
language: FACTORIES_LANGUAGE_ID,
scheme: 'file'
}
],
synchronize: {

View File

@@ -30,6 +30,7 @@
"onLanguage:spring-boot-properties-yaml",
"onLanguage:java",
"onLanguage:xml",
"onLanguage:spring-factories",
"onDebugResolve:java",
"onCommand:vscode-spring-boot.rewrite.list"
],
@@ -64,6 +65,16 @@
"bootstrap*.properties"
],
"configuration": "./properties-support/language-configuration.json"
},
{
"id": "spring-factories",
"aliases": [
"Spring Factories"
],
"filenamePatterns": [
"*.factories"
],
"configuration": "./properties-support/language-configuration.json"
}
],
"menus": {
@@ -390,6 +401,18 @@
"HINT",
"ERROR"
]
},
"spring-boot.ls.problem.boot3.FACTORIES_KEY_NOT_SUPPORTED": {
"type": "string",
"default": "ERROR",
"description": "Spring factories key not supported",
"enum": [
"IGNORE",
"INFO",
"WARNING",
"HINT",
"ERROR"
]
}
}
},
@@ -734,6 +757,11 @@
"language": "spring-boot-properties",
"scopeName": "source.java-properties",
"path": "./properties-support/java-properties.tmLanguage"
},
{
"language": "spring-factories",
"scopeName": "source.java-properties",
"path": "./properties-support/java-properties.tmLanguage"
}
]
},