Replies: 2 comments 1 reply
-
As there is no serializer yet there is also no semantic quickfixes. we write our serializers manually. maybe you can do that too |
Beta Was this translation helpful? Give feedback.
0 replies
-
Is there an example demonstrating how to make "simple quick fixes" (e.g., inserting code at a given location)? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all,
as a first tryout I managed to migrate a rather small Xtext project to Langium, including some UI / LSP customizations like code completion, inlay hints and hover support. I am a bit stuck with rewriting quick fixes to code actions though. Some first tests worked, but when it comes to more comprehensive cases I am not able to express these using WorkspaceEdit though. Is there anything like the semantic quick fixes in Xtext so I could just update some AST node(s) and apply these to the document again? In the code actions contained in the Langium grammar I saw that it seems to "reach" other parts of the documents (instead of the property affected by the corresponding validation constraint) using for example an actionRange provided by the diagnostic data. But I could not make a sense of this yet in order to apply it on my own cases. Thanks for any pointers that might help here.
My second, more general question: is there any documentation about LSP customizations in general? As the Langium docs do not cover these topics at all I thought that maybe there already exist some further resources.
Beta Was this translation helpful? Give feedback.
All reactions