generated from JetBrains/intellij-platform-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add setting for disable lsp completion
- Loading branch information
Showing
2 changed files
with
26 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package lean4ij.lsp | ||
|
||
import com.intellij.openapi.components.service | ||
import com.intellij.psi.PsiFile | ||
import com.redhat.devtools.lsp4ij.client.features.LSPCompletionFeature | ||
import lean4ij.Lean4Settings | ||
|
||
/** | ||
* Add an impl for disable lsp completion for lean | ||
* for sometimes it's slow... | ||
*/ | ||
class LeanLSPCompletionFeature : LSPCompletionFeature() { | ||
Check warning on line 12 in src/main/kotlin/lean4ij/lsp/LeanLSPCompletionFeature.kt GitHub Actions / Qodana Community for JVMUnstable API Usage
Check warning on line 12 in src/main/kotlin/lean4ij/lsp/LeanLSPCompletionFeature.kt GitHub Actions / Qodana Community for JVMUnstable API Usage
|
||
private val lean4Settings = service<Lean4Settings>() | ||
|
||
override fun isEnabled(file: PsiFile): Boolean { | ||
Check warning on line 15 in src/main/kotlin/lean4ij/lsp/LeanLSPCompletionFeature.kt GitHub Actions / Qodana Community for JVMUnstable API Usage
|
||
return lean4Settings.enableLspCompletion | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters