fix: Updated lsp backend to fix deprecations
This commit is contained in:
parent
0a62f1b0cb
commit
3e3d955bd1
5 changed files with 24 additions and 11 deletions
|
@ -18,6 +18,12 @@ Changelog structure reference:
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
### Added
|
||||
- Proper documentation view (CTRL+Q) instead of the janky hover thing
|
||||
|
||||
### Removed
|
||||
- IDEA 2022 support (Necessary change for the new documentation backend in lsp4intellij)
|
||||
|
||||
## [0.5.0] "The *ZON*iverse"
|
||||
|
||||
### Added
|
||||
|
|
|
@ -42,7 +42,7 @@ repositories {
|
|||
|
||||
dependencies {
|
||||
compileOnly(libs.annotations)
|
||||
implementation("com.github.FalsePattern:lsp4intellij:f557fc84bf")
|
||||
implementation("com.github.FalsePattern:lsp4intellij:ea62500d74")
|
||||
}
|
||||
|
||||
intellij {
|
||||
|
|
|
@ -5,12 +5,12 @@ pluginRepositoryUrl = https://github.com/FalsePattern/ZigBrains
|
|||
pluginVersion = 0.5.0
|
||||
|
||||
# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
|
||||
pluginSinceBuild = 222
|
||||
pluginSinceBuild = 231
|
||||
pluginUntilBuild = 232.*
|
||||
|
||||
# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension
|
||||
platformType = IC
|
||||
platformVersion = 2022.2.5
|
||||
platformVersion = 2023.1.5
|
||||
|
||||
# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
|
||||
# Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22
|
||||
|
|
|
@ -22,17 +22,24 @@ import com.intellij.notification.NotificationType;
|
|||
import com.intellij.notification.Notifications;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.startup.ProjectActivity;
|
||||
import com.intellij.openapi.startup.StartupActivity;
|
||||
import kotlin.Result;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.wso2.lsp4intellij.IntellijLanguageClient;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.InvalidPathException;
|
||||
import java.nio.file.Path;
|
||||
import java.util.ArrayList;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
|
||||
public class ZLSStartupActivity implements StartupActivity {
|
||||
public class ZLSStartupActivity implements ProjectActivity {
|
||||
private static final ReentrantLock lock = new ReentrantLock();
|
||||
|
||||
public static void initZLS() {
|
||||
|
@ -121,15 +128,17 @@ public class ZLSStartupActivity implements StartupActivity {
|
|||
return true;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public void runActivity(@NotNull Project project) {
|
||||
public Object execute(@NotNull Project project, @NotNull Continuation<? super Unit> continuation) {
|
||||
var path = AppSettingsState.getInstance().zlsPath;
|
||||
if ("".equals(path)) {
|
||||
Notifications.Bus.notify(new Notification("ZigBrains.Nag", "No ZLS binary",
|
||||
"Please configure the path to the zls executable in the Zig language configuration menu!",
|
||||
NotificationType.INFORMATION));
|
||||
return;
|
||||
return null;
|
||||
}
|
||||
initZLS();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,6 +55,9 @@
|
|||
id="LSPFoldingRangeProvider"
|
||||
order="first"/>
|
||||
|
||||
<!-- needed for documentation -->
|
||||
<platform.backend.documentation.targetProvider implementation="org.wso2.lsp4intellij.contributors.LSPDocumentationTargetProvider"/>
|
||||
|
||||
<!-- endregion LSP4IntelliJ -->
|
||||
|
||||
<fileType name="Zig File"
|
||||
|
@ -115,11 +118,6 @@
|
|||
|
||||
<!-- region LSP4IntelliJ -->
|
||||
|
||||
<!-- needed for hover -->
|
||||
<action id="org.intellij.sdk.action.QuickDocAction"
|
||||
class="org.wso2.lsp4intellij.actions.LSPQuickDocAction">
|
||||
</action>
|
||||
|
||||
<!-- needed for find references -->
|
||||
<action class="org.wso2.lsp4intellij.actions.LSPReferencesAction"
|
||||
id="LSPFindUsages">
|
||||
|
|
Loading…
Add table
Reference in a new issue