Git Product home page Git Product logo

Comments (5)

angelozerr avatar angelozerr commented on June 25, 2024

Could youshare please your XML file?

Which vesrion are you isng of vscode-xml?

from lemminx.

ManojkumarV avatar ManojkumarV commented on June 25, 2024

Here is my XML Code

<?xml version="1.0" encoding="UTF-8"?> <manoj>

I'm not using vscode-xml. We are using our own language client. We just cloned this repository, built it using the steps provided and used the Jar file.

Java version
openjdk 11.0.20.1 2023-08-24 OpenJDK Runtime Environment (build 11.0.20.1+1-post-Ubuntu-0ubuntu120.04) OpenJDK 64-Bit Server VM (build 11.0.20.1+1-post-Ubuntu-0ubuntu120.04, mixed mode, sharing)

from lemminx.

angelozerr avatar angelozerr commented on June 25, 2024

I'm not using vscode-xml. We are using our own language client. We just cloned this repository, built it using the steps provided and used the Jar file.

Ok I understand more.

The NPE comes from

ca.getEdit().getDocumentChanges().get(0).getLeft().getEdits());
and it seems that your LSP client doesn't support the LSP codeActionLiteralSupport and and this case you need to implement a custom LSP command _xml.applyCodeAction

We could fix the NPE but your code actions will not work except if you implement custom LSP command _xml.applyCodeAction

I suggest really that you support codeActionLiteralSupport in your LSP client to follow the LSP specification and yoru code actions will work too with another language server.

We did this work when LSP didn't provide codeActionLiteralSupport but I think we should remove the code with _xml.applyCodeAction

@fbricon @datho7561 what do you think about that?

from lemminx.

ManojkumarV avatar ManojkumarV commented on June 25, 2024

Thanks @angelozerr It worked after adding codeActionLiteralSupport.

from lemminx.

fbricon avatar fbricon commented on June 25, 2024

reopening as Lemminx should be able to gracefully handle clients that don't support codeActionLiteralSupport.

from lemminx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.