~damien/jedit-lsp

c132703e1467abd6865c8a397a2eb5b0b5bbbdd1 — Damien Radtke 4 months ago 8cbb630
Log settings that are sent to the server
2 files changed, 4 insertions(+), 1 deletions(-)

M lsp/Server.java
M lsp/jEditLanguageClient.java
M lsp/Server.java => lsp/Server.java +1 -0
@@ 310,6 310,7 @@ public class Server {
		try {
			Settings settings = Settings.get(this.workspaceFolders);
			DidChangeConfigurationParams params = new DidChangeConfigurationParams(settings.getAll());
			log(Log.DEBUG, "Initializing with configuration: " + settings.getAll().toString());
			this.handle.getRemoteProxy().getWorkspaceService().didChangeConfiguration(params);
		} catch (Exception e) {
			log(Log.WARNING, "Failed to send initial configuration", e);

M lsp/jEditLanguageClient.java => lsp/jEditLanguageClient.java +3 -1
@@ 311,8 311,10 @@ public class jEditLanguageClient implements LanguageClient {
			try {
				Settings settings = Settings.get(this.server.getWorkspaceFolders());
				for (ConfigurationItem item : params.getItems()) {
					Map<String, Object> sectionSettings = settings.getSection(item.getSection());
					Log.log(Log.DEBUG, this, "sending configuration section: " + sectionSettings.toString());
					// TODO: support the scope parameter?
					config.add(settings.getSection(item.getSection()));
					config.add(sectionSettings);
				}
			} catch (Exception e) {
				Log.log(Log.WARNING, this, "Failed to load requested configuration", e);