Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify reflection-config.json so that binary works in coc.nvim #1022

Merged
merged 1 commit into from
Apr 26, 2021

Conversation

datho7561
Copy link
Contributor

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:/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:
{
  "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 [email protected]

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:/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 <[email protected]>
Copy link
Contributor

@rgrunber rgrunber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixed the issue even with vscode and latest lemminx binary.

@datho7561 datho7561 merged commit c2d1f58 into eclipse:master Apr 26, 2021
@datho7561 datho7561 deleted the fix-reflection-vim branch April 26, 2021 13:36
@datho7561 datho7561 added this to the 0.17.0 milestone Apr 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants