From 7e21643a4ad2de408f8c7dc873f34b1398c06060 Mon Sep 17 00:00:00 2001 From: Shanghe Chen Date: Sun, 27 Oct 2024 11:39:28 +0800 Subject: [PATCH] some minor changes --- README.md | 2 ++ src/main/kotlin/lean4ij/language/Lean4PsiFile.kt | 2 +- src/main/kotlin/lean4ij/lsp/LeanLanguageServerFactory.kt | 2 +- .../kotlin/lean4ij/lsp/data/InteractiveDiagnosticsParams.kt | 1 - 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7b551f6..5b26bed 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,8 @@ The plugin is still on an early stage, check [ISSUES.md](./ISSUES.md) for known - (Windows) `$HOME\AppData\Local\JetBrains\\log\idea.log` - (Macos) `~/Library/Caches//log/idea.log` - If the IDE is freezing, try check also the `threadDumps-freeze-***` files under the log folder. + +For showing debug/trace log, add `lean4ij:all` in `MENU > Help > Diagnostic Tools > Debug Log Settings` and restart, see [How-to-enable-debug-logging-in-IntelliJ-IDEA](https://youtrack.jetbrains.com/articles/SUPPORT-A-43/How-to-enable-debug-logging-in-IntelliJ-IDEA) for more docs. ## Acknowledgments diff --git a/src/main/kotlin/lean4ij/language/Lean4PsiFile.kt b/src/main/kotlin/lean4ij/language/Lean4PsiFile.kt index 9fd9ce7..196d3bc 100644 --- a/src/main/kotlin/lean4ij/language/Lean4PsiFile.kt +++ b/src/main/kotlin/lean4ij/language/Lean4PsiFile.kt @@ -15,6 +15,6 @@ class Lean4PsiFile(viewProvider: FileViewProvider) : PsiFileBase(viewProvider, L } override fun toString(): String { - return "Lean4 Psi File" + return "Lean4PsiFile($virtualFile)" } } \ No newline at end of file diff --git a/src/main/kotlin/lean4ij/lsp/LeanLanguageServerFactory.kt b/src/main/kotlin/lean4ij/lsp/LeanLanguageServerFactory.kt index 2e6a750..8d0b09f 100644 --- a/src/main/kotlin/lean4ij/lsp/LeanLanguageServerFactory.kt +++ b/src/main/kotlin/lean4ij/lsp/LeanLanguageServerFactory.kt @@ -61,7 +61,7 @@ class LeanLanguageServerFactory : LanguageServerFactory, LanguageServerEnablemen completionFeature = LeanLSPCompletionFeature() } // waiting for lsp4ij https://github.com/redhat-developer/lsp4ij/pull/586 - /*override*/ fun isEnabled(file: VirtualFile): Boolean { + override fun isEnabled(file: VirtualFile): Boolean { return FileEditorManager.getInstance(project).selectedTextEditor?.let { it.virtualFile == file }?: false diff --git a/src/main/kotlin/lean4ij/lsp/data/InteractiveDiagnosticsParams.kt b/src/main/kotlin/lean4ij/lsp/data/InteractiveDiagnosticsParams.kt index 133d3e2..58dc443 100644 --- a/src/main/kotlin/lean4ij/lsp/data/InteractiveDiagnosticsParams.kt +++ b/src/main/kotlin/lean4ij/lsp/data/InteractiveDiagnosticsParams.kt @@ -1,6 +1,5 @@ package lean4ij.lsp.data -import io.kinference.ndarray.extensions.inferType import lean4ij.util.Constants import org.eclipse.lsp4j.TextDocumentIdentifier