Skip to content

Commit

Permalink
Allow LCLS to handle custom config files (#286)
Browse files Browse the repository at this point in the history
* Send all .properties and .env files to LCLS. Send fileChange events for .properties, .env, and liberty-plugin-config.xml to LCLS
  • Loading branch information
evie-lau authored Sep 11, 2023
1 parent 63d3ee3 commit 51d21b4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,14 +211,15 @@ function startLangServer(context: ExtensionContext, requirements: RequirementsDa
function prepareClientOptions(Liberty_LS :boolean) {
if (Liberty_LS) {
return {
// Filter to `bootstrap.properties` and `server.env` files within `src/main/liberty/config` or `usr/servers`
// Filter to `*.properties` and `*.env` files, let LCLS handle filtering for default/custom configs
documentSelector: [{ scheme: "file",
pattern: "**/{src/main/liberty/config,usr/servers/**}/{bootstrap.properties,server.env}" }],
pattern: "**/{*.properties,*.env}" }],
synchronize: {
configurationSection: SUPPORTED_LANGUAGE_IDS,
fileEvents: [
workspace.createFileSystemWatcher("**/bootstrap.properties"),
workspace.createFileSystemWatcher("**/server.env")
workspace.createFileSystemWatcher("**/*.properties"),
workspace.createFileSystemWatcher("**/*.env"),
workspace.createFileSystemWatcher("**/liberty-plugin-config.xml")
],
}
};
Expand Down

0 comments on commit 51d21b4

Please sign in to comment.