0

I am very new to Language Server Protocol.

I have all the xtext related files ie. content assist, validation, quick fixes etc in eclipse and our client is intellij.

I want to implement quickfixes using LSP which are already present in eclipse.
Can some one guide me?

21
  • 1
    did you checkout github.com/xtext/xtext-languageserver-example/blob/master/… or github.com/eclipse/xtext/blob/… Commented Feb 26, 2024 at 8:25
  • I checked these links and found that MyDslIdeQuickfixProvider is added in eclipse code and which is bind in MyDslIdeModule along with QuickFixCodeActionService. I also did in the same way but still on error when I hover in runtime intellij, I can only see error but not quickfix even while debugging, quickfix class is not called. Do I need anything in intellij code as well? Commented Feb 27, 2024 at 7:42
  • did you check which services intellij calls. did you also check the client/server options on the initialize calls? Commented Feb 27, 2024 at 9:24
  • does it work in vscode? Commented Feb 27, 2024 at 9:26
  • 1
    see org.eclipse.xtext.ide.server.LanguageServerImpl.createServerCapabilities(InitializeParams) it does serverCapabilities.setCodeActionProvider(allLanguages.stream() .anyMatch((serviceProvider) -> serviceProvider.get(ICodeActionService2.class) != null)); so i assume you miss github.com/xtext/xtext-languageserver-example/blob/… Commented Feb 29, 2024 at 18:37

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.