From ef2d7d739e5f57367ea681d5b9d9350988499670 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Wed, 21 Apr 2021 14:34:25 -0400 Subject: [PATCH] Modify reflection-config.json so that binary works in coc.nvim coc.nvim is one of the implementations of LSP for vim/neovim. There's an existing configuration for running the Java build of LemMinX, but a reflection exception occurs when trying to run the binary build. This PR registers the class for reflection so the binary works in coc.nvim. To test: * Build the LemMinX binary, put in on your PATH * Install coc.nvim: https://github.com/neoclide/coc.nvim/wiki/Install-coc.nvim * If you have the existing XML support `coc-xml` already set up, uninstall with `:CocUninstall coc-xml` * Open the configuration file with `:CocConfig` * Add the following configuration: ```json { "languageserver": { "xml": { "command": "lemminx", "trace.server": "verbose", "initializationOptions": {}, "filetypes": [ "xml" ] } } } ``` * Save and quit * Open an XML file, check if syntax errors appear Signed-off-by: David Thompson --- .../resources/META-INF/native-image/reflect-config.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/org.eclipse.lemminx/src/main/resources/META-INF/native-image/reflect-config.json b/org.eclipse.lemminx/src/main/resources/META-INF/native-image/reflect-config.json index e021ad84f..f229f58ed 100644 --- a/org.eclipse.lemminx/src/main/resources/META-INF/native-image/reflect-config.json +++ b/org.eclipse.lemminx/src/main/resources/META-INF/native-image/reflect-config.json @@ -405,6 +405,14 @@ "parameterTypes": [] }] }, + { + "name": "org.eclipse.lsp4j.ClientInfo", + "allDeclaredFields": true, + "methods": [{ + "name": "", + "parameterTypes": [] + }] + }, { "name": "org.eclipse.lsp4j.CodeAction", "allDeclaredFields": true,