Skip to content

Commit 3f0b6b7

Browse files
authored
Merge pull request #20 from MicroShed/q0401
Merge branch Q0401 into main
2 parents 014d8ef + 162897a commit 3f0b6b7

187 files changed

Lines changed: 13466 additions & 3864 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

build.gradle

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ plugins {
66
}
77

88
group 'org.microshed'
9-
version '0.0.4'
9+
version '0.0.5'
1010

1111
sourceCompatibility = 17
1212
targetCompatibility = 17
@@ -67,7 +67,11 @@ dependencies {
6767
implementation 'org.eclipse.lsp4j:org.eclipse.lsp4j:0.21.0'
6868
implementation 'org.eclipse.lsp4j:org.eclipse.lsp4j.jsonrpc:0.21.0'
6969
//required by lsp4j as the version from IJ is incompatible
70-
implementation 'com.google.code.gson:gson:2.8.9'
70+
implementation 'com.google.code.gson:gson:2.10.1'
71+
implementation 'com.vladsch.flexmark:flexmark:0.64.8'
72+
implementation 'com.vladsch.flexmark:flexmark-ext-tables:0.64.8'
73+
implementation 'com.vladsch.flexmark:flexmark-ext-autolink:0.64.8'
74+
implementation 'com.vladsch.flexmark:flexmark-ext-gfm-strikethrough:0.64.8'
7175
//Add junit dependency back when tests are added
7276
}
7377

@@ -76,24 +80,12 @@ jar {
7680
manifest {
7781
attributes "Main-Class": "MainClass"
7882
}
79-
80-
from {
81-
configurations.implementation.collect { it.isDirectory() ? it : zipTree(it) }
82-
} {
83-
exclude "META-INF/*.SF"
84-
exclude "META-INF/*.DSA"
85-
exclude "META-INF/*.RSA"
86-
duplicatesStrategy 'include' // error copying duplicate about.html
87-
}
88-
from { sourceSets.main.allSource } {
89-
duplicatesStrategy 'exclude' // error copying .properties when adding source to jar
90-
}
9183
extension 'jar'
9284
}
9385

9486
intellij {
9587
// For a full list of IntelliJ IDEA releases please see https://www.jetbrains.com/intellij-repository/releases
96-
version = '2022.2'
88+
version = '2023.1'
9789
updateSinceUntilBuild = false
9890
plugins = ['java', 'gradle-java', 'com.intellij.gradle']
9991
}

src/main/java/org/microshed/lsp4ij/CompletableFutures.java

Lines changed: 0 additions & 88 deletions
This file was deleted.

src/main/java/org/microshed/lsp4ij/ConnectDocumentToLanguageServerSetupParticipant.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import com.intellij.openapi.project.Project;
1616
import com.intellij.openapi.project.ProjectManagerListener;
1717
import com.intellij.openapi.vfs.VirtualFile;
18+
import com.intellij.psi.PsiFile;
1819
import org.microshed.lsp4ij.client.CoalesceByKey;
1920
import org.microshed.lsp4ij.internal.PromiseToCompletableFuture;
2021
import org.microshed.lsp4ij.lifecycle.LanguageServerLifecycleManager;
@@ -61,6 +62,19 @@ public void fileOpened(@NotNull FileEditorManager source, @NotNull VirtualFile f
6162
new ConnectToLanguageServerCompletableFuture(file, project);
6263
}
6364

65+
@Override
66+
public void fileClosed(@NotNull FileEditorManager source, @NotNull VirtualFile file) {
67+
// file is closed
68+
PsiFile psiFile = LSPIJUtils.getPsiFile(file, source.getProject());
69+
if (psiFile != null) {
70+
if (LSPFileSupport.hasSupport(psiFile)) {
71+
// The closed file is mapped with language servers, dispose it
72+
// to cancel all LSP codeLens, inlayHint, color, etc futures
73+
LSPFileSupport.getSupport(psiFile).dispose();
74+
}
75+
}
76+
}
77+
6478
private static void connectToLanguageServer(@NotNull VirtualFile file, @NotNull Project project) {
6579
// Force the start of all languages servers mapped with the given file
6680
// Server capabilities filter is set to null to avoid waiting

src/main/java/org/microshed/lsp4ij/ContentTypeToLanguageServerDefinition.java

Lines changed: 0 additions & 50 deletions
This file was deleted.

0 commit comments

Comments
 (0)