chore: Remove obsolete configs
This commit is contained in:
parent
68d1e60b3e
commit
5f4a770ebe
5 changed files with 8 additions and 23 deletions
|
@ -22,6 +22,11 @@ Changelog structure reference:
|
|||
- Project
|
||||
- Relative paths in zig toolchain configuration would break the entire IDE
|
||||
|
||||
### Removed
|
||||
|
||||
- ZLS
|
||||
- Obsolete config options which are no longer used since migrating to LSP4IJ
|
||||
|
||||
## [17.0.0]
|
||||
|
||||
### Added
|
||||
|
|
|
@ -38,19 +38,11 @@ public final class ZLSProjectSettingsService extends WrappingStateComponent<ZLSS
|
|||
}
|
||||
|
||||
public boolean isModified(ZLSSettings otherData) {
|
||||
val myData = this.getState();
|
||||
boolean modified = zlsSettingsModified(otherData);
|
||||
modified |= myData.asyncFolding != otherData.asyncFolding;
|
||||
return modified;
|
||||
}
|
||||
|
||||
public boolean zlsSettingsModified(ZLSSettings otherData) {
|
||||
val myData = this.getState();
|
||||
boolean modified = !Objects.equals(myData.zlsPath, otherData.zlsPath);
|
||||
modified |= !Objects.equals(myData.zlsConfigPath, otherData.zlsConfigPath);
|
||||
modified |= myData.debug != otherData.debug;
|
||||
modified |= myData.messageTrace != otherData.messageTrace;
|
||||
modified |= myData.increaseTimeouts != otherData.increaseTimeouts;
|
||||
modified |= myData.buildOnSave != otherData.buildOnSave;
|
||||
modified |= !Objects.equals(myData.buildOnSaveStep, otherData.buildOnSaveStep);
|
||||
modified |= myData.highlightGlobalVarDeclarations != otherData.highlightGlobalVarDeclarations;
|
||||
|
|
|
@ -26,8 +26,6 @@ import org.jetbrains.annotations.Nullable;
|
|||
public final class ZLSSettings {
|
||||
public @Nullable String zlsPath;
|
||||
public @NotNull String zlsConfigPath;
|
||||
public boolean increaseTimeouts;
|
||||
public boolean asyncFolding;
|
||||
public boolean debug;
|
||||
public boolean messageTrace;
|
||||
public boolean buildOnSave;
|
||||
|
@ -36,6 +34,6 @@ public final class ZLSSettings {
|
|||
public boolean dangerousComptimeExperimentsDoNotEnable;
|
||||
|
||||
public ZLSSettings() {
|
||||
this(null, "", false, true, false, false, false, "install", false, false);
|
||||
this(null, "", false, false, false, "install", false, false);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ public class ZLSSettingsConfigurable implements SubConfigurable {
|
|||
public void apply() {
|
||||
var settings = ZLSProjectSettingsService.getInstance(project);
|
||||
val data = appSettingsComponent.getData();
|
||||
boolean reloadZLS = settings.zlsSettingsModified(data);
|
||||
boolean reloadZLS = settings.isModified(data);
|
||||
settings.loadState(data);
|
||||
if (reloadZLS) {
|
||||
ZLSStartupActivity.startLSP(project, true);
|
||||
|
|
|
@ -42,8 +42,6 @@ public class ZLSSettingsPanel implements Disposable {
|
|||
private final TextFieldWithBrowseButton zlsConfigPath = TextFieldUtil.pathToFileTextField(this,
|
||||
"Path to the Custom ZLS Config File (Optional)",
|
||||
() -> {});
|
||||
private final JBCheckBox asyncFolding = new JBCheckBox();
|
||||
private final JBCheckBox increaseTimeouts = new JBCheckBox();
|
||||
|
||||
private final JBCheckBox buildOnSave = new JBCheckBox();
|
||||
private final JBTextField buildOnSaveStep = new ExtendableTextField();
|
||||
|
@ -76,16 +74,12 @@ public class ZLSSettingsPanel implements Disposable {
|
|||
Optional.ofNullable(ZLSProjectSettingsService.getInstance(ProjectManager.getInstance().getDefaultProject()))
|
||||
.map(ZLSProjectSettingsService::getState)
|
||||
.ifPresent(this::setData);
|
||||
panel.group("ZLS launch settings", true, p -> {
|
||||
panel.group("ZLS Settings", true, p -> {
|
||||
p.row("Executable path", r -> {
|
||||
r.cell(zlsPath).resizableColumn().align(AlignX.FILL);
|
||||
r.button("Autodetect", $f(this::autodetect));
|
||||
});
|
||||
p.cell("Config path (leave empty to use built-in config)", zlsConfigPath, AlignX.FILL);
|
||||
p.cell("Increase timeouts", increaseTimeouts);
|
||||
p.cell("Asynchronous code folding ranges", asyncFolding);
|
||||
});
|
||||
panel.group("ZLS Configuration", false, p -> {
|
||||
p.cell("Build on save", buildOnSave);
|
||||
p.row("Build on save step", r -> {
|
||||
r.cell(buildOnSaveStep).resizableColumn().align(AlignX.FILL);
|
||||
|
@ -102,8 +96,6 @@ public class ZLSSettingsPanel implements Disposable {
|
|||
public ZLSSettings getData() {
|
||||
return new ZLSSettings(zlsPath.getText(),
|
||||
zlsConfigPath.getText(),
|
||||
increaseTimeouts.isSelected(),
|
||||
asyncFolding.isSelected(),
|
||||
debug.isSelected(),
|
||||
messageTrace.isSelected(),
|
||||
buildOnSave.isSelected(),
|
||||
|
@ -115,8 +107,6 @@ public class ZLSSettingsPanel implements Disposable {
|
|||
public void setData(ZLSSettings value) {
|
||||
zlsPath.setText(value.zlsPath == null ? "" : value.zlsPath);
|
||||
zlsConfigPath.setText(value.zlsConfigPath);
|
||||
increaseTimeouts.setSelected(value.increaseTimeouts);
|
||||
asyncFolding.setSelected(value.asyncFolding);
|
||||
debug.setSelected(value.debug);
|
||||
messageTrace.setSelected(value.messageTrace);
|
||||
buildOnSave.setSelected(value.buildOnSave);
|
||||
|
|
Loading…
Add table
Reference in a new issue