Skip to content

Commit

Permalink
chore: consume Quarkus LS to benefit with Ollama support
Browse files Browse the repository at this point in the history
Signed-off-by: azerr <[email protected]>
  • Loading branch information
angelozerr committed Oct 23, 2024
1 parent fab15ed commit 75cbb61
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ public QuarkusLanguageClient(Project project) {
@Override
public void dispose() {
super.dispose();
connection.disconnect();
if (connection != null) {
connection.disconnect();
}
UserDefinedMicroProfileSettings.getInstance(getProject()).removeChangeHandler(getDidChangeConfigurationListener());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.File;
import java.nio.file.Path;
import java.util.Arrays;
import java.util.HashMap;
Expand All @@ -49,9 +50,9 @@ public QuarkusServer(Project project) {
Path quarkusServerPath = pluginPath.resolve("lib/server/com.redhat.quarkus.ls.jar");

List<String> commands = new JavaProcessCommandBuilder(project, "microprofile")
.setJar(lsp4mpServerPath.toString())
.setCp(quarkusServerPath.toString())
.setCp(lsp4mpServerPath.toString() + File.pathSeparatorChar + quarkusServerPath.toString())
.create();
commands.add("org.eclipse.lsp4mp.ls.MicroProfileServerLauncher");
commands.add("-DrunAsync=true");
super.setCommands(commands);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ public QuteLanguageClient(Project project) {
@Override
public void dispose() {
super.dispose();
connection.disconnect();
if (connection != null) {
connection.disconnect();
}
UserDefinedQuteSettings.getInstance(getProject()).removeChangeHandler(getDidChangeConfigurationListener());
}

Expand Down

0 comments on commit 75cbb61

Please sign in to comment.