Skip to content

Commit

Permalink
Merge pull request #20 from MicroShed/q0401
Browse files Browse the repository at this point in the history
Merge branch Q0401 into main
  • Loading branch information
turkeylurkey authored May 30, 2024
2 parents 014d8ef + 162897a commit 3f0b6b7
Show file tree
Hide file tree
Showing 187 changed files with 13,466 additions and 3,864 deletions.
22 changes: 7 additions & 15 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
}

group 'org.microshed'
version '0.0.4'
version '0.0.5'

sourceCompatibility = 17
targetCompatibility = 17
Expand Down Expand Up @@ -67,7 +67,11 @@ dependencies {
implementation 'org.eclipse.lsp4j:org.eclipse.lsp4j:0.21.0'
implementation 'org.eclipse.lsp4j:org.eclipse.lsp4j.jsonrpc:0.21.0'
//required by lsp4j as the version from IJ is incompatible
implementation 'com.google.code.gson:gson:2.8.9'
implementation 'com.google.code.gson:gson:2.10.1'
implementation 'com.vladsch.flexmark:flexmark:0.64.8'
implementation 'com.vladsch.flexmark:flexmark-ext-tables:0.64.8'
implementation 'com.vladsch.flexmark:flexmark-ext-autolink:0.64.8'
implementation 'com.vladsch.flexmark:flexmark-ext-gfm-strikethrough:0.64.8'
//Add junit dependency back when tests are added
}

Expand All @@ -76,24 +80,12 @@ jar {
manifest {
attributes "Main-Class": "MainClass"
}

from {
configurations.implementation.collect { it.isDirectory() ? it : zipTree(it) }
} {
exclude "META-INF/*.SF"
exclude "META-INF/*.DSA"
exclude "META-INF/*.RSA"
duplicatesStrategy 'include' // error copying duplicate about.html
}
from { sourceSets.main.allSource } {
duplicatesStrategy 'exclude' // error copying .properties when adding source to jar
}
extension 'jar'
}

intellij {
// For a full list of IntelliJ IDEA releases please see https://www.jetbrains.com/intellij-repository/releases
version = '2022.2'
version = '2023.1'
updateSinceUntilBuild = false
plugins = ['java', 'gradle-java', 'com.intellij.gradle']
}
Expand Down
88 changes: 0 additions & 88 deletions src/main/java/org/microshed/lsp4ij/CompletableFutures.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import com.intellij.openapi.project.Project;
import com.intellij.openapi.project.ProjectManagerListener;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.psi.PsiFile;
import org.microshed.lsp4ij.client.CoalesceByKey;
import org.microshed.lsp4ij.internal.PromiseToCompletableFuture;
import org.microshed.lsp4ij.lifecycle.LanguageServerLifecycleManager;
Expand Down Expand Up @@ -61,6 +62,19 @@ public void fileOpened(@NotNull FileEditorManager source, @NotNull VirtualFile f
new ConnectToLanguageServerCompletableFuture(file, project);
}

@Override
public void fileClosed(@NotNull FileEditorManager source, @NotNull VirtualFile file) {
// file is closed
PsiFile psiFile = LSPIJUtils.getPsiFile(file, source.getProject());
if (psiFile != null) {
if (LSPFileSupport.hasSupport(psiFile)) {
// The closed file is mapped with language servers, dispose it
// to cancel all LSP codeLens, inlayHint, color, etc futures
LSPFileSupport.getSupport(psiFile).dispose();
}
}
}

private static void connectToLanguageServer(@NotNull VirtualFile file, @NotNull Project project) {
// Force the start of all languages servers mapped with the given file
// Server capabilities filter is set to null to avoid waiting
Expand Down

This file was deleted.

Loading

0 comments on commit 3f0b6b7

Please sign in to comment.