diff --git a/CHANGELOG.md b/CHANGELOG.md index 2562a50c..494952d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,24 @@ Changelog structure reference: ## [Unreleased] +## [21.0.0] + +### Added + +- ZLS + - All of the config options are now exposed in the GUI + +### Changed + +- Project + - New project panel is now much more compact + +### Fixed + +- Zig + - `zig env` failure causes an IDE error + - A local toolchain disappearing (std directory or zig exe deleted) is now handled properly + ## [20.3.0] - Zig diff --git a/LICENSE b/LICENSE index cf77975f..2d0c7b3b 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ ZigBrains -Copyright (C) 2023-2024 FalsePattern +Copyright (C) 2023-2025 FalsePattern All Rights Reserved The above copyright notice and this permission notice shall be included diff --git a/build.gradle.kts b/build.gradle.kts index e60c0a8f..3e1a2f38 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -109,6 +109,7 @@ dependencies { runtimeOnly(project(":core")) runtimeOnly(project(":cidr")) + runtimeOnly(project(":lsp")) } intellijPlatform { diff --git a/build.sh b/build.sh index cec24d27..f91f693d 100644 --- a/build.sh +++ b/build.sh @@ -1,18 +1,24 @@ #!/bin/sh # -# Copyright 2023-2024 FalsePattern +# This file is part of ZigBrains. # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# Copyright (C) 2023-2025 FalsePattern +# All Rights Reserved # -# http://www.apache.org/licenses/LICENSE-2.0 +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# ZigBrains is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation, only version 3 of the License. +# +# ZigBrains is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with ZigBrains. If not, see . # set -e diff --git a/cidr/src/main/kotlin/com/falsepattern/zigbrains/cidr/ZigWorkspace.kt b/cidr/src/main/kotlin/com/falsepattern/zigbrains/cidr/ZigWorkspace.kt index 212cfaaf..842587ac 100644 --- a/cidr/src/main/kotlin/com/falsepattern/zigbrains/cidr/ZigWorkspace.kt +++ b/cidr/src/main/kotlin/com/falsepattern/zigbrains/cidr/ZigWorkspace.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/cidr/src/main/kotlin/com/falsepattern/zigbrains/cidr/ZigWorkspaceProvider.kt b/cidr/src/main/kotlin/com/falsepattern/zigbrains/cidr/ZigWorkspaceProvider.kt index 9cb974a8..47c50e3f 100644 --- a/cidr/src/main/kotlin/com/falsepattern/zigbrains/cidr/ZigWorkspaceProvider.kt +++ b/cidr/src/main/kotlin/com/falsepattern/zigbrains/cidr/ZigWorkspaceProvider.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/cidr/src/main/kotlin/com/falsepattern/zigbrains/clion/ZigClionDebuggerDriverConfigurationProvider.kt b/cidr/src/main/kotlin/com/falsepattern/zigbrains/clion/ZigClionDebuggerDriverConfigurationProvider.kt index a17e784b..317608aa 100644 --- a/cidr/src/main/kotlin/com/falsepattern/zigbrains/clion/ZigClionDebuggerDriverConfigurationProvider.kt +++ b/cidr/src/main/kotlin/com/falsepattern/zigbrains/clion/ZigClionDebuggerDriverConfigurationProvider.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugbridge/ZigDebuggerDriverConfigurationProviderBase.kt b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugbridge/ZigDebuggerDriverConfigurationProviderBase.kt index 0283ee04..d02cbfe4 100644 --- a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugbridge/ZigDebuggerDriverConfigurationProviderBase.kt +++ b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugbridge/ZigDebuggerDriverConfigurationProviderBase.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/DebuggerFeatures.kt b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/DebuggerFeatures.kt index 0a47ff25..73bd55c0 100644 --- a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/DebuggerFeatures.kt +++ b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/DebuggerFeatures.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/ZigDebugBundle.kt b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/ZigDebugBundle.kt index 56f363d0..7fac370e 100644 --- a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/ZigDebugBundle.kt +++ b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/ZigDebugBundle.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/ZigDebuggerDriverConfigurationProvider.kt b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/ZigDebuggerDriverConfigurationProvider.kt index 2d768b0d..39048d34 100644 --- a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/ZigDebuggerDriverConfigurationProvider.kt +++ b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/ZigDebuggerDriverConfigurationProvider.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/ZigDebuggerEditorsExtension.kt b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/ZigDebuggerEditorsExtension.kt index bf0b1b98..21064468 100644 --- a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/ZigDebuggerEditorsExtension.kt +++ b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/ZigDebuggerEditorsExtension.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/ZigDebuggerLanguage.kt b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/ZigDebuggerLanguage.kt index 1202a1dc..a961a594 100644 --- a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/ZigDebuggerLanguage.kt +++ b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/ZigDebuggerLanguage.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/ZigDebuggerLanguageSupport.kt b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/ZigDebuggerLanguageSupport.kt index 496bba9f..762f209b 100644 --- a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/ZigDebuggerLanguageSupport.kt +++ b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/ZigDebuggerLanguageSupport.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/ZigDefaultDebuggerDriverConfigurationProvider.kt b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/ZigDefaultDebuggerDriverConfigurationProvider.kt index 8a1b30c8..7a1676b9 100644 --- a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/ZigDefaultDebuggerDriverConfigurationProvider.kt +++ b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/ZigDefaultDebuggerDriverConfigurationProvider.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/ZigLineBreakpointFileTypesProvider.kt b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/ZigLineBreakpointFileTypesProvider.kt index eda6db26..cf1455da 100644 --- a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/ZigLineBreakpointFileTypesProvider.kt +++ b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/ZigLineBreakpointFileTypesProvider.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/ZigLocalDebugProcess.kt b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/ZigLocalDebugProcess.kt index 58a74ae5..fe9fcc31 100644 --- a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/ZigLocalDebugProcess.kt +++ b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/ZigLocalDebugProcess.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/ZigLocalVariablesFilterHandler.kt b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/ZigLocalVariablesFilterHandler.kt index 2a0a82b7..14541434 100644 --- a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/ZigLocalVariablesFilterHandler.kt +++ b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/ZigLocalVariablesFilterHandler.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/dap/BlockingPipedInputStream.kt b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/dap/BlockingPipedInputStream.kt index ceb90915..00630bce 100644 --- a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/dap/BlockingPipedInputStream.kt +++ b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/dap/BlockingPipedInputStream.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/dap/DAPDebuggerDriverConfiguration.kt b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/dap/DAPDebuggerDriverConfiguration.kt index 7954e716..52a17475 100644 --- a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/dap/DAPDebuggerDriverConfiguration.kt +++ b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/dap/DAPDebuggerDriverConfiguration.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/dap/DAPDriver.kt b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/dap/DAPDriver.kt index 3120957b..852bce4b 100644 --- a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/dap/DAPDriver.kt +++ b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/dap/DAPDriver.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/dap/Util.kt b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/dap/Util.kt index 78e978dc..e9e17154 100644 --- a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/dap/Util.kt +++ b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/dap/Util.kt @@ -1,17 +1,23 @@ /* - * Copyright 2023-2024 FalsePattern + * This file is part of ZigBrains. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (C) 2023-2025 FalsePattern + * All Rights Reserved * - * http://www.apache.org/licenses/LICENSE-2.0 + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * ZigBrains is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, only version 3 of the License. + * + * ZigBrains is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with ZigBrains. If not, see . */ package com.falsepattern.zigbrains.debugger.dap diff --git a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/execution/binary/ZigConfigTypeBinary.kt b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/execution/binary/ZigConfigTypeBinary.kt index 87d18e21..524c6a7b 100644 --- a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/execution/binary/ZigConfigTypeBinary.kt +++ b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/execution/binary/ZigConfigTypeBinary.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/execution/binary/ZigExecConfigBinary.kt b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/execution/binary/ZigExecConfigBinary.kt index 9cdb57a7..b7beed30 100644 --- a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/execution/binary/ZigExecConfigBinary.kt +++ b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/execution/binary/ZigExecConfigBinary.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/execution/binary/ZigProfileStateBinary.kt b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/execution/binary/ZigProfileStateBinary.kt index 319b20f2..708c9f9b 100644 --- a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/execution/binary/ZigProfileStateBinary.kt +++ b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/execution/binary/ZigProfileStateBinary.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/base/PreLaunchAware.kt b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/base/PreLaunchAware.kt index 0ff51606..c887319c 100644 --- a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/base/PreLaunchAware.kt +++ b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/base/PreLaunchAware.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/base/PreLaunchProcessListener.kt b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/base/PreLaunchProcessListener.kt index b1324ba9..adde5c81 100644 --- a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/base/PreLaunchProcessListener.kt +++ b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/base/PreLaunchProcessListener.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/base/ZigDebugEmitBinaryInstaller.kt b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/base/ZigDebugEmitBinaryInstaller.kt index 18b157af..6190c5c0 100644 --- a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/base/ZigDebugEmitBinaryInstaller.kt +++ b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/base/ZigDebugEmitBinaryInstaller.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/base/ZigDebugParametersBase.kt b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/base/ZigDebugParametersBase.kt index 7cae51d2..038c564a 100644 --- a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/base/ZigDebugParametersBase.kt +++ b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/base/ZigDebugParametersBase.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/base/ZigDebugParametersEmitBinaryBase.kt b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/base/ZigDebugParametersEmitBinaryBase.kt index 332c2b9c..8a2f6458 100644 --- a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/base/ZigDebugParametersEmitBinaryBase.kt +++ b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/base/ZigDebugParametersEmitBinaryBase.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/base/ZigDebugRunnerBase.kt b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/base/ZigDebugRunnerBase.kt index d9b1d694..6749d484 100644 --- a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/base/ZigDebugRunnerBase.kt +++ b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/base/ZigDebugRunnerBase.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/binary/ZigDebugParametersBinary.kt b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/binary/ZigDebugParametersBinary.kt index 18db6999..f253d691 100644 --- a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/binary/ZigDebugParametersBinary.kt +++ b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/binary/ZigDebugParametersBinary.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/binary/ZigDebugRunnerBinary.kt b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/binary/ZigDebugRunnerBinary.kt index d82ba469..6da574e4 100644 --- a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/binary/ZigDebugRunnerBinary.kt +++ b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/binary/ZigDebugRunnerBinary.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/build/ZigDebugParametersBuild.kt b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/build/ZigDebugParametersBuild.kt index 418371d7..a0a3ff76 100644 --- a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/build/ZigDebugParametersBuild.kt +++ b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/build/ZigDebugParametersBuild.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/build/ZigDebugRunnerBuild.kt b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/build/ZigDebugRunnerBuild.kt index 0098c8be..575ab657 100644 --- a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/build/ZigDebugRunnerBuild.kt +++ b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/build/ZigDebugRunnerBuild.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/run/ZigDebugParametersRun.kt b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/run/ZigDebugParametersRun.kt index f840f45e..1b09d4ec 100644 --- a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/run/ZigDebugParametersRun.kt +++ b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/run/ZigDebugParametersRun.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/run/ZigDebugRunnerRun.kt b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/run/ZigDebugRunnerRun.kt index 6c3e4b13..9cc440d8 100644 --- a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/run/ZigDebugRunnerRun.kt +++ b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/run/ZigDebugRunnerRun.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/test/ZigDebugParametersTest.kt b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/test/ZigDebugParametersTest.kt index e263037c..7f45423c 100644 --- a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/test/ZigDebugParametersTest.kt +++ b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/test/ZigDebugParametersTest.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/test/ZigDebugRunnerTest.kt b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/test/ZigDebugRunnerTest.kt index caab3d25..f4673d6d 100644 --- a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/test/ZigDebugRunnerTest.kt +++ b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/runner/test/ZigDebugRunnerTest.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/settings/MSVCDownloadPermission.kt b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/settings/MSVCDownloadPermission.kt index 15c482fe..d877ab61 100644 --- a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/settings/MSVCDownloadPermission.kt +++ b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/settings/MSVCDownloadPermission.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/settings/ZigDebuggerGeneralSettingsConfigurableUi.kt b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/settings/ZigDebuggerGeneralSettingsConfigurableUi.kt index 7c6d3101..9447f31c 100644 --- a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/settings/ZigDebuggerGeneralSettingsConfigurableUi.kt +++ b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/settings/ZigDebuggerGeneralSettingsConfigurableUi.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/settings/ZigDebuggerSettings.kt b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/settings/ZigDebuggerSettings.kt index 4d163ee2..1fe2818a 100644 --- a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/settings/ZigDebuggerSettings.kt +++ b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/settings/ZigDebuggerSettings.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/settings/ZigDebuggerToolchainConfigurableUi.kt b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/settings/ZigDebuggerToolchainConfigurableUi.kt index fb84b17c..a9a79879 100644 --- a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/settings/ZigDebuggerToolchainConfigurableUi.kt +++ b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/settings/ZigDebuggerToolchainConfigurableUi.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/settings/ZigDebuggerUiComponent.kt b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/settings/ZigDebuggerUiComponent.kt index 2019d17c..b44c39c9 100644 --- a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/settings/ZigDebuggerUiComponent.kt +++ b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/settings/ZigDebuggerUiComponent.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/toolchain/DebuggerAvailability.kt b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/toolchain/DebuggerAvailability.kt index a662e645..4f2922a5 100644 --- a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/toolchain/DebuggerAvailability.kt +++ b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/toolchain/DebuggerAvailability.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/toolchain/DebuggerKind.kt b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/toolchain/DebuggerKind.kt index 09d8fc38..207aae5b 100644 --- a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/toolchain/DebuggerKind.kt +++ b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/toolchain/DebuggerKind.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/toolchain/MSVCMetadataProvider.kt b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/toolchain/MSVCMetadataProvider.kt index 15d2c4ec..097737f4 100644 --- a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/toolchain/MSVCMetadataProvider.kt +++ b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/toolchain/MSVCMetadataProvider.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/toolchain/ZigDebuggerToolchainService.kt b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/toolchain/ZigDebuggerToolchainService.kt index f6f87701..97354cd3 100644 --- a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/toolchain/ZigDebuggerToolchainService.kt +++ b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/toolchain/ZigDebuggerToolchainService.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/win/MSVCDriverConfiguration.kt b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/win/MSVCDriverConfiguration.kt index 6f2ecdc3..8e5273a6 100644 --- a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/win/MSVCDriverConfiguration.kt +++ b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/win/MSVCDriverConfiguration.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/win/WinDAPDriver.kt b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/win/WinDAPDriver.kt index 0d008a89..39693544 100644 --- a/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/win/WinDAPDriver.kt +++ b/cidr/src/main/kotlin/com/falsepattern/zigbrains/debugger/win/WinDAPDriver.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/build.gradle.kts b/core/build.gradle.kts index 75b04bca..e7d5afeb 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -7,8 +7,6 @@ plugins { kotlin("plugin.serialization") } -val lsp4ijVersion: String by project -val lsp4jVersion: String by project val ideaCommunityVersion: String by project val useInstaller = property("useInstaller").toString().toBoolean() @@ -16,8 +14,6 @@ dependencies { intellijPlatform { create(IntelliJPlatformType.IntellijIdeaCommunity, ideaCommunityVersion, useInstaller = useInstaller) } - compileOnly("com.redhat.devtools.intellij:lsp4ij:$lsp4ijVersion") - compileOnly("org.eclipse.lsp4j:org.eclipse.lsp4j:$lsp4jVersion") compileOnly("org.jetbrains.kotlinx:kotlinx-serialization-core:1.6.3") } diff --git a/core/src/main/grammar/Zig.bnf b/core/src/main/grammar/Zig.bnf index 74c1bdce..a548e060 100644 --- a/core/src/main/grammar/Zig.bnf +++ b/core/src/main/grammar/Zig.bnf @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/grammar/Zig.flex b/core/src/main/grammar/Zig.flex index 3a4ce57e..1a36a5ab 100644 --- a/core/src/main/grammar/Zig.flex +++ b/core/src/main/grammar/Zig.flex @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/grammar/ZigString.flex b/core/src/main/grammar/ZigString.flex index 24fb085d..d66643e3 100644 --- a/core/src/main/grammar/ZigString.flex +++ b/core/src/main/grammar/ZigString.flex @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/grammar/Zon.bnf b/core/src/main/grammar/Zon.bnf index 7c11102a..2bd91e0e 100644 --- a/core/src/main/grammar/Zon.bnf +++ b/core/src/main/grammar/Zon.bnf @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/grammar/Zon.flex b/core/src/main/grammar/Zon.flex index ccab2a3b..0937e36d 100644 --- a/core/src/main/grammar/Zon.flex +++ b/core/src/main/grammar/Zon.flex @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/Icons.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/Icons.kt index d518563e..d8683fae 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/Icons.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/Icons.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/ZBStartup.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/ZBStartup.kt index 6e76a5f5..d9780011 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/ZBStartup.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/ZBStartup.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included @@ -25,7 +25,6 @@ package com.falsepattern.zigbrains import com.falsepattern.zigbrains.direnv.DirenvCmd import com.falsepattern.zigbrains.direnv.emptyEnv import com.falsepattern.zigbrains.direnv.getDirenv -import com.falsepattern.zigbrains.lsp.settings.zlsSettings import com.falsepattern.zigbrains.project.settings.zigProjectSettings import com.falsepattern.zigbrains.project.toolchain.LocalZigToolchain import com.falsepattern.zigbrains.project.toolchain.ZigToolchainProvider @@ -89,17 +88,6 @@ class ZBStartup: ProjectActivity { project.zigProjectSettings.state = zigProjectState } } - val zlsState = project.zlsSettings.state - if (zlsState.zlsPath.isBlank()) { - val env = if (DirenvCmd.direnvInstalled() && !project.isDefault && zlsState.direnv) - project.getDirenv() - else - emptyEnv - env.findExecutableOnPATH("zls")?.let { - zlsState.zlsPath = it.pathString - project.zlsSettings.state = zlsState - } - } } } diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/ZigBrainsBundle.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/ZigBrainsBundle.kt index f99c670b..7cd9402e 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/ZigBrainsBundle.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/ZigBrainsBundle.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/direnv/DirenvCmd.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/direnv/DirenvCmd.kt index de04cf66..6c68650e 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/direnv/DirenvCmd.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/direnv/DirenvCmd.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/direnv/DirenvOutput.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/direnv/DirenvOutput.kt index 2fcf8b81..feb21522 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/direnv/DirenvOutput.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/direnv/DirenvOutput.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/direnv/DirenvProjectService.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/direnv/DirenvProjectService.kt index d9997b79..fec31d4a 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/direnv/DirenvProjectService.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/direnv/DirenvProjectService.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/direnv/Env.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/direnv/Env.kt index 66286a42..bb108cb1 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/direnv/Env.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/direnv/Env.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/lsp/config/ZLSConfig.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/lsp/config/ZLSConfig.kt deleted file mode 100644 index 47ae4035..00000000 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/lsp/config/ZLSConfig.kt +++ /dev/null @@ -1,37 +0,0 @@ -/* - * This file is part of ZigBrains. - * - * Copyright (C) 2023-2024 FalsePattern - * All Rights Reserved - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * ZigBrains is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, only version 3 of the License. - * - * ZigBrains is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with ZigBrains. If not, see . - */ - -package com.falsepattern.zigbrains.lsp.config - -import kotlinx.serialization.SerialName -import kotlinx.serialization.Serializable -import org.jetbrains.annotations.NonNls - -@Serializable -data class ZLSConfig( - @SerialName("zig_exe_path") val zigExePath: @NonNls String? = null, - @SerialName("zig_lib_path") val zigLibPath: @NonNls String? = null, - @SerialName("enable_build_on_save") val buildOnSave: Boolean? = null, - @SerialName("build_on_save_step") val buildOnSaveStep: @NonNls String? = null, - @SerialName("dangerous_comptime_experiments_do_not_enable") val comptimeInterpreter: Boolean? = null, - @SerialName("highlight_global_var_declarations") val globalVarDeclarations: Boolean? = null -) diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/lsp/settings/ZLSSettings.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/lsp/settings/ZLSSettings.kt deleted file mode 100644 index 89a8452c..00000000 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/lsp/settings/ZLSSettings.kt +++ /dev/null @@ -1,39 +0,0 @@ -/* - * This file is part of ZigBrains. - * - * Copyright (C) 2023-2024 FalsePattern - * All Rights Reserved - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * ZigBrains is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, only version 3 of the License. - * - * ZigBrains is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with ZigBrains. If not, see . - */ - -package com.falsepattern.zigbrains.lsp.settings - -import org.jetbrains.annotations.NonNls - -data class ZLSSettings( - var direnv: Boolean = false, - var zlsPath: @NonNls String = "", - var zlsConfigPath: @NonNls String = "", - var debug: Boolean = false, - var messageTrace: Boolean = false, - var buildOnSave: Boolean = false, - var buildOnSaveStep: @NonNls String = "install", - var globalVarDeclarations: Boolean = false, - var comptimeInterpreter: Boolean = false, - var inlayHints: Boolean = true, - var inlayHintsCompact: Boolean = true -) diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/lsp/settings/ZLSSettingsPanel.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/lsp/settings/ZLSSettingsPanel.kt deleted file mode 100644 index 7aad64cc..00000000 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/lsp/settings/ZLSSettingsPanel.kt +++ /dev/null @@ -1,148 +0,0 @@ -/* - * This file is part of ZigBrains. - * - * Copyright (C) 2023-2024 FalsePattern - * All Rights Reserved - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * ZigBrains is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, only version 3 of the License. - * - * ZigBrains is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with ZigBrains. If not, see . - */ - -package com.falsepattern.zigbrains.lsp.settings - -import com.falsepattern.zigbrains.direnv.DirenvCmd -import com.falsepattern.zigbrains.direnv.Env -import com.falsepattern.zigbrains.direnv.emptyEnv -import com.falsepattern.zigbrains.direnv.getDirenv -import com.falsepattern.zigbrains.lsp.ZLSBundle -import com.falsepattern.zigbrains.shared.coroutine.launchWithEDT -import com.falsepattern.zigbrains.shared.zigCoroutineScope -import com.intellij.openapi.Disposable -import com.intellij.openapi.fileChooser.FileChooserDescriptorFactory -import com.intellij.openapi.project.Project -import com.intellij.openapi.util.Disposer -import com.intellij.platform.ide.progress.ModalTaskOwner -import com.intellij.platform.ide.progress.TaskCancellation -import com.intellij.platform.ide.progress.withModalProgress -import com.intellij.ui.components.JBCheckBox -import com.intellij.ui.components.fields.ExtendableTextField -import com.intellij.ui.components.textFieldWithBrowseButton -import com.intellij.ui.dsl.builder.AlignX -import com.intellij.ui.dsl.builder.Panel -import kotlin.io.path.pathString - -class ZLSSettingsPanel(private val project: Project?) : Disposable { - private val zlsPath = textFieldWithBrowseButton( - project, - ZLSBundle.message("settings.zls-path.browse.title"), - FileChooserDescriptorFactory.createSingleFileDescriptor(), - ).also { Disposer.register(this, it) } - private val zlsConfigPath = textFieldWithBrowseButton( - project, - ZLSBundle.message("settings.zls-config-path.browse.title"), - FileChooserDescriptorFactory.createSingleFileDescriptor() - ).also { Disposer.register(this, it) } - - private val buildOnSave = JBCheckBox().apply { toolTipText = ZLSBundle.message("settings.build-on-save.tooltip") } - private val buildOnSaveStep = ExtendableTextField().apply { toolTipText = ZLSBundle.message("settings.build-on-save-step.tooltip") } - private val globalVarDeclarations = JBCheckBox() - private val comptimeInterpreter = JBCheckBox() - private val inlayHints = JBCheckBox() - private val inlayHintsCompact = JBCheckBox().apply { toolTipText = ZLSBundle.message("settings.inlay-hints-compact.tooltip") } - - private val messageTrace = JBCheckBox() - private val debug = JBCheckBox() - private val direnv = JBCheckBox(ZLSBundle.message("settings.zls-path.use-direnv.label")).apply { addActionListener { - dispatchAutodetect(true) - } } - - fun attach(panel: Panel) = with(panel) { - group(ZLSBundle.message("settings.group.title")) { - row(ZLSBundle.message("settings.zls-path.label")) { - cell(zlsPath).resizableColumn().align(AlignX.FILL) - if (DirenvCmd.direnvInstalled() && project?.isDefault == false) { - cell(direnv) - } - } - row(ZLSBundle.message("settings.zls-config-path.label")) { cell(zlsConfigPath).align(AlignX.FILL) } - row(ZLSBundle.message("settings.inlay-hints.label")) { cell(inlayHints) } - row(ZLSBundle.message("settings.inlay-hints-compact.label")) { cell(inlayHintsCompact) } - row(ZLSBundle.message("settings.build-on-save.label")) { cell(buildOnSave) } - row(ZLSBundle.message("settings.build-on-save-step.label")) { cell(buildOnSaveStep).resizableColumn().align(AlignX.FILL) } - row(ZLSBundle.message("settings.global-var-declarations.label")) { cell(globalVarDeclarations) } - row(ZLSBundle.message("settings.comptime-interpreter.label")) { cell(comptimeInterpreter) } - } - group(ZLSBundle.message("dev-settings.group.title")) { - row(ZLSBundle.message("dev-settings.debug.label")) { cell(debug) } - row(ZLSBundle.message("dev-settings.message-trace.label")) { cell(messageTrace) } - } - dispatchAutodetect(false) - } - - var data - get() = ZLSSettings( - direnv.isSelected, - zlsPath.text, - zlsConfigPath.text, - debug.isSelected, - messageTrace.isSelected, - buildOnSave.isSelected, - buildOnSaveStep.text, - globalVarDeclarations.isSelected, - comptimeInterpreter.isSelected, - inlayHints.isSelected, - inlayHintsCompact.isSelected - ) - set(value) { - direnv.isSelected = value.direnv - zlsPath.text = value.zlsPath - zlsConfigPath.text = value.zlsConfigPath - debug.isSelected = value.debug - messageTrace.isSelected = value.messageTrace - buildOnSave.isSelected = value.buildOnSave - buildOnSaveStep.text = value.buildOnSaveStep - globalVarDeclarations.isSelected = value.globalVarDeclarations - comptimeInterpreter.isSelected = value.comptimeInterpreter - inlayHints.isSelected = value.inlayHints - inlayHintsCompact.isSelected = value.inlayHintsCompact - } - - private fun dispatchAutodetect(force: Boolean) { - project.zigCoroutineScope.launchWithEDT { - withModalProgress(ModalTaskOwner.component(zlsPath), "Detecting ZLS...", TaskCancellation.cancellable()) { - autodetect(force) - } - } - } - - suspend fun autodetect(force: Boolean) { - if (force || zlsPath.text.isBlank()) { - getDirenv().findExecutableOnPATH("zls")?.let { - if (force || zlsPath.text.isBlank()) { - zlsPath.text = it.pathString - } - } - } - } - - override fun dispose() { - } - - private suspend fun getDirenv(): Env { - if (DirenvCmd.direnvInstalled() && project?.isDefault == false && direnv.isSelected) - return project.getDirenv() - return emptyEnv - } -} \ No newline at end of file diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/actions/ZigNewFileAction.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/actions/ZigNewFileAction.kt index e43ecf09..98712e09 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/actions/ZigNewFileAction.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/actions/ZigNewFileAction.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/console/ZigConsoleFilterProvider.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/console/ZigConsoleFilterProvider.kt index 3c96bf42..5b38aa7a 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/console/ZigConsoleFilterProvider.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/console/ZigConsoleFilterProvider.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/console/ZigSourceFileFilter.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/console/ZigSourceFileFilter.kt index fd10cf1c..8f6018c9 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/console/ZigSourceFileFilter.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/console/ZigSourceFileFilter.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/Util.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/Util.kt index 8a2e9380..840048de 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/Util.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/Util.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/base/Configuration.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/base/Configuration.kt index 66514f1f..9ea7590d 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/base/Configuration.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/base/Configuration.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/base/OptimizationLevel.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/base/OptimizationLevel.kt index c2868a93..952a00df 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/base/OptimizationLevel.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/base/OptimizationLevel.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/base/ZigConfigProducer.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/base/ZigConfigProducer.kt index 5fd6c73e..8f9c50df 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/base/ZigConfigProducer.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/base/ZigConfigProducer.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/base/ZigExecConfig.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/base/ZigExecConfig.kt index f331ba26..ab1ab23b 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/base/ZigExecConfig.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/base/ZigExecConfig.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/base/ZigProfileState.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/base/ZigProfileState.kt index e983afeb..acf77fdc 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/base/ZigProfileState.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/base/ZigProfileState.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/base/ZigTopLevelLineMarker.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/base/ZigTopLevelLineMarker.kt index 6c56113d..6e908406 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/base/ZigTopLevelLineMarker.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/base/ZigTopLevelLineMarker.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/build/ZigConfigProducerBuild.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/build/ZigConfigProducerBuild.kt index a2777ce9..2d027c88 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/build/ZigConfigProducerBuild.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/build/ZigConfigProducerBuild.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/build/ZigConfigTypeBuild.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/build/ZigConfigTypeBuild.kt index 022b84dc..7c3d3593 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/build/ZigConfigTypeBuild.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/build/ZigConfigTypeBuild.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/build/ZigExecConfigBuild.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/build/ZigExecConfigBuild.kt index 2d1f24f6..5a0bcb4a 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/build/ZigExecConfigBuild.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/build/ZigExecConfigBuild.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/build/ZigLineMarkerBuild.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/build/ZigLineMarkerBuild.kt index f686ed3d..e9b2c534 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/build/ZigLineMarkerBuild.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/build/ZigLineMarkerBuild.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/build/ZigProfileStateBuild.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/build/ZigProfileStateBuild.kt index 01349c2d..78fe6d1a 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/build/ZigProfileStateBuild.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/build/ZigProfileStateBuild.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/run/ZigConfigProducerRun.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/run/ZigConfigProducerRun.kt index 36a75683..65c98081 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/run/ZigConfigProducerRun.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/run/ZigConfigProducerRun.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/run/ZigConfigTypeRun.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/run/ZigConfigTypeRun.kt index dfc22587..7c642fd0 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/run/ZigConfigTypeRun.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/run/ZigConfigTypeRun.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/run/ZigExecConfigRun.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/run/ZigExecConfigRun.kt index 5b0862e3..d68a6dce 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/run/ZigExecConfigRun.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/run/ZigExecConfigRun.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/run/ZigLineMarkerRun.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/run/ZigLineMarkerRun.kt index ce7ca680..aa2981fe 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/run/ZigLineMarkerRun.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/run/ZigLineMarkerRun.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/run/ZigProfileStateRun.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/run/ZigProfileStateRun.kt index d1ed5c28..68aeb292 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/run/ZigProfileStateRun.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/run/ZigProfileStateRun.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/test/ZigConfigProducerTest.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/test/ZigConfigProducerTest.kt index 946e0e9d..73d01aad 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/test/ZigConfigProducerTest.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/test/ZigConfigProducerTest.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/test/ZigConfigTypeTest.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/test/ZigConfigTypeTest.kt index e7515e48..9db490c0 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/test/ZigConfigTypeTest.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/test/ZigConfigTypeTest.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/test/ZigExecConfigTest.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/test/ZigExecConfigTest.kt index ffb520d7..a5894756 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/test/ZigExecConfigTest.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/test/ZigExecConfigTest.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/test/ZigLineMarkerTest.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/test/ZigLineMarkerTest.kt index 9ad43054..602a4bee 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/test/ZigLineMarkerTest.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/test/ZigLineMarkerTest.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/test/ZigProfileStateTest.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/test/ZigProfileStateTest.kt index bafeae8e..1647e616 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/test/ZigProfileStateTest.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/execution/test/ZigProfileStateTest.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/module/ZigModuleBuilder.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/module/ZigModuleBuilder.kt index 6ff052d5..f6d0d66e 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/module/ZigModuleBuilder.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/module/ZigModuleBuilder.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/module/ZigModuleType.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/module/ZigModuleType.kt index 270512ea..1a68860e 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/module/ZigModuleType.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/module/ZigModuleType.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/newproject/ZigDirectoryProjectGenerator.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/newproject/ZigDirectoryProjectGenerator.kt index 7f9b8fad..dfbb9e0c 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/newproject/ZigDirectoryProjectGenerator.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/newproject/ZigDirectoryProjectGenerator.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/newproject/ZigNewProjectPanel.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/newproject/ZigNewProjectPanel.kt index f1a6ecfc..1297acc1 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/newproject/ZigNewProjectPanel.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/newproject/ZigNewProjectPanel.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included @@ -22,8 +22,7 @@ package com.falsepattern.zigbrains.project.newproject -import com.falsepattern.zigbrains.lsp.settings.ZLSSettingsPanel -import com.falsepattern.zigbrains.project.settings.ZigProjectSettingsPanel +import com.falsepattern.zigbrains.project.settings.ZigProjectConfigurationProvider import com.falsepattern.zigbrains.project.template.ZigExecutableTemplate import com.falsepattern.zigbrains.project.template.ZigInitTemplate import com.falsepattern.zigbrains.project.template.ZigLibraryTemplate @@ -44,8 +43,7 @@ import javax.swing.ListSelectionModel class ZigNewProjectPanel(private var handleGit: Boolean): Disposable { private val git = JBCheckBox() - private val projConf = ZigProjectSettingsPanel(null).also { Disposer.register(this, it) } - private val zlsConf = ZLSSettingsPanel(null).also { Disposer.register(this, it) } + private val panels = ZigProjectConfigurationProvider.createNewProjectSettingsPanels().onEach { Disposer.register(this, it) } private val templateList = JBList(JBList.createDefaultListModel(defaultTemplates)).apply { selectionMode = ListSelectionModel.SINGLE_SELECTION selectedIndex = 0 @@ -68,7 +66,7 @@ class ZigNewProjectPanel(private var handleGit: Boolean): Disposable { fun getData(): ZigProjectConfigurationData { val selectedTemplate = templateList.selectedValue - return ZigProjectConfigurationData(handleGit && git.isSelected, projConf.data, zlsConf.data, selectedTemplate) + return ZigProjectConfigurationData(handleGit && git.isSelected, panels.map { it.data }, selectedTemplate) } fun attach(p: Panel): Unit = with(p) { @@ -85,8 +83,7 @@ class ZigNewProjectPanel(private var handleGit: Boolean): Disposable { .align(AlignY.FILL) } } - projConf.attach(p) - zlsConf.attach(p) + panels.forEach { it.attach(p) } } override fun dispose() { diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/newproject/ZigNewProjectWizard.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/newproject/ZigNewProjectWizard.kt index 1b0f1959..1c420d1e 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/newproject/ZigNewProjectWizard.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/newproject/ZigNewProjectWizard.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/newproject/ZigProjectConfigurationData.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/newproject/ZigProjectConfigurationData.kt index 980a4e7d..e15d2636 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/newproject/ZigProjectConfigurationData.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/newproject/ZigProjectConfigurationData.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included @@ -22,10 +22,7 @@ package com.falsepattern.zigbrains.project.newproject -import com.falsepattern.zigbrains.lsp.settings.ZLSSettings -import com.falsepattern.zigbrains.lsp.settings.zlsSettings -import com.falsepattern.zigbrains.project.settings.ZigProjectSettings -import com.falsepattern.zigbrains.project.settings.zigProjectSettings +import com.falsepattern.zigbrains.project.settings.ZigProjectConfigurationProvider import com.falsepattern.zigbrains.project.template.ZigInitTemplate import com.falsepattern.zigbrains.project.template.ZigProjectTemplate import com.falsepattern.zigbrains.shared.zigCoroutineScope @@ -45,21 +42,21 @@ import kotlinx.coroutines.launch @JvmRecord data class ZigProjectConfigurationData( val git: Boolean, - val projConf: ZigProjectSettings, - val zlsConf: ZLSSettings, + val conf: List, val selectedTemplate: ZigProjectTemplate ) { @RequiresBackgroundThread suspend fun generateProject(requestor: Any, project: Project, baseDir: VirtualFile, forceGitignore: Boolean): Boolean { return reportProgress { reporter -> - project.zigProjectSettings.loadState(projConf) - project.zlsSettings.loadState(zlsConf) + conf.forEach { it.apply(project) } val template = selectedTemplate if (!reporter.indeterminateStep("Initializing project") { if (template is ZigInitTemplate) { - val toolchain = projConf.toolchain ?: run { + val toolchain = conf + .mapNotNull { it as? ZigProjectConfigurationProvider.ToolchainProvider } + .firstNotNullOfOrNull { it.toolchain } ?: run { Notification( "zigbrains", "Tried to generate project with zig init, but zig toolchain is invalid", @@ -77,12 +74,20 @@ data class ZigProjectConfigurationData( return@indeterminateStep false } val result = zig.callWithArgs(workDir, "init") + if (result == null) { + Notification( + "zigbrains", + "\"zig init\" could not run because the zig executable was missing!", + NotificationType.ERROR + ).notify(project) + return@indeterminateStep false + } if (result.exitCode != 0) { Notification( "zigbrains", "\"zig init\" failed with exit code ${result.exitCode}! Check the IDE log files!", NotificationType.ERROR - ) + ).notify(project) System.err.println(result.stderr) return@indeterminateStep false } diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/newproject/ZigProjectGeneratorPeer.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/newproject/ZigProjectGeneratorPeer.kt index 4049f710..41db4c5f 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/newproject/ZigProjectGeneratorPeer.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/newproject/ZigProjectGeneratorPeer.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/newproject/ZigProjectSettingsStep.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/newproject/ZigProjectSettingsStep.kt index 2f5df17a..47a57e25 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/newproject/ZigProjectSettingsStep.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/newproject/ZigProjectSettingsStep.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/run/ZigProcessHandler.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/run/ZigProcessHandler.kt index 02801f45..125e595e 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/run/ZigProcessHandler.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/run/ZigProcessHandler.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/run/ZigProgramRunner.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/run/ZigProgramRunner.kt index 60b38902..e897c893 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/run/ZigProgramRunner.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/run/ZigProgramRunner.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/run/ZigRegularRunner.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/run/ZigRegularRunner.kt index 12933dcd..d2d7638a 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/run/ZigRegularRunner.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/run/ZigRegularRunner.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/settings/ZigConfigurable.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/settings/ZigConfigurable.kt index be1bf725..e16b058f 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/settings/ZigConfigurable.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/settings/ZigConfigurable.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included @@ -22,11 +22,10 @@ package com.falsepattern.zigbrains.project.settings -import com.falsepattern.zigbrains.lsp.settings.ZLSSettingsConfigurable import com.falsepattern.zigbrains.shared.MultiConfigurable import com.intellij.openapi.project.Project -class ZigConfigurable(project: Project): MultiConfigurable(ZigProjectConfigurable(project), ZLSSettingsConfigurable(project)) { +class ZigConfigurable(project: Project): MultiConfigurable(ZigProjectConfigurationProvider.createConfigurables(project)) { override fun getDisplayName(): String { return "Zig" } diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/lsp/settings/ZLSSettingsConfigProvider.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/settings/ZigCoreProjectConfigurationProvider.kt similarity index 55% rename from core/src/main/kotlin/com/falsepattern/zigbrains/lsp/settings/ZLSSettingsConfigProvider.kt rename to core/src/main/kotlin/com/falsepattern/zigbrains/project/settings/ZigCoreProjectConfigurationProvider.kt index 7948bfb3..d8a76a88 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/lsp/settings/ZLSSettingsConfigProvider.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/settings/ZigCoreProjectConfigurationProvider.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included @@ -20,20 +20,24 @@ * along with ZigBrains. If not, see . */ -package com.falsepattern.zigbrains.lsp.settings +package com.falsepattern.zigbrains.project.settings -import com.falsepattern.zigbrains.lsp.config.ZLSConfig -import com.falsepattern.zigbrains.lsp.config.ZLSConfigProvider +import com.falsepattern.zigbrains.shared.SubConfigurable import com.intellij.openapi.project.Project +import com.intellij.openapi.project.ProjectManager -class ZLSSettingsConfigProvider: ZLSConfigProvider { - override fun getEnvironment(project: Project, previous: ZLSConfig): ZLSConfig { - val state = project.zlsSettings.state - return previous.copy( - buildOnSave = state.buildOnSave, - buildOnSaveStep = state.buildOnSaveStep, - globalVarDeclarations = state.globalVarDeclarations, - comptimeInterpreter = state.comptimeInterpreter - ) +class ZigCoreProjectConfigurationProvider: ZigProjectConfigurationProvider { + override fun handleMainConfigChanged(project: Project) { } + + override fun createConfigurable(project: Project): SubConfigurable { + return ZigProjectConfigurable(project) + } + + override fun createNewProjectSettingsPanel(): ZigProjectConfigurationProvider.SettingsPanel { + return ZigProjectSettingsPanel(ProjectManager.getInstance().defaultProject) + } + + override val priority: Int + get() = 0 } \ No newline at end of file diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/settings/ZigProjectConfigurable.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/settings/ZigProjectConfigurable.kt index 91672806..c45adba7 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/settings/ZigProjectConfigurable.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/settings/ZigProjectConfigurable.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included @@ -22,7 +22,6 @@ package com.falsepattern.zigbrains.project.settings -import com.falsepattern.zigbrains.lsp.startLSP import com.falsepattern.zigbrains.shared.SubConfigurable import com.intellij.openapi.project.Project import com.intellij.openapi.util.Disposer @@ -45,7 +44,7 @@ class ZigProjectConfigurable(private val project: Project): SubConfigurable { val modified = service.isModified(data) service.state = data if (modified) { - startLSP(project, true) + ZigProjectConfigurationProvider.mainConfigChanged(project) } } diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/settings/ZigProjectConfigurationProvider.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/settings/ZigProjectConfigurationProvider.kt new file mode 100644 index 00000000..058e18b6 --- /dev/null +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/settings/ZigProjectConfigurationProvider.kt @@ -0,0 +1,59 @@ +/* + * This file is part of ZigBrains. + * + * Copyright (C) 2023-2025 FalsePattern + * All Rights Reserved + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * ZigBrains is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, only version 3 of the License. + * + * ZigBrains is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with ZigBrains. If not, see . + */ + +package com.falsepattern.zigbrains.project.settings + +import com.falsepattern.zigbrains.project.toolchain.AbstractZigToolchain +import com.falsepattern.zigbrains.shared.SubConfigurable +import com.intellij.openapi.Disposable +import com.intellij.openapi.extensions.ExtensionPointName +import com.intellij.openapi.project.Project +import com.intellij.ui.dsl.builder.Panel + +interface ZigProjectConfigurationProvider { + fun handleMainConfigChanged(project: Project) + fun createConfigurable(project: Project): SubConfigurable + fun createNewProjectSettingsPanel(): SettingsPanel? + val priority: Int + companion object { + private val EXTENSION_POINT_NAME = ExtensionPointName.create("com.falsepattern.zigbrains.projectConfigProvider") + fun mainConfigChanged(project: Project) { + EXTENSION_POINT_NAME.extensionList.forEach { it.handleMainConfigChanged(project) } + } + fun createConfigurables(project: Project): List { + return EXTENSION_POINT_NAME.extensionList.sortedBy { it.priority }.map { it.createConfigurable(project) } + } + fun createNewProjectSettingsPanels(): List { + return EXTENSION_POINT_NAME.extensionList.sortedBy { it.priority }.mapNotNull { it.createNewProjectSettingsPanel() } + } + } + interface SettingsPanel: Disposable { + val data: Settings + fun attach(p: Panel) + } + interface Settings { + fun apply(project: Project) + } + interface ToolchainProvider { + val toolchain: AbstractZigToolchain? + } +} \ No newline at end of file diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/settings/ZigProjectSettings.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/settings/ZigProjectSettings.kt index 9763fe24..facf092c 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/settings/ZigProjectSettings.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/settings/ZigProjectSettings.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included @@ -23,8 +23,10 @@ package com.falsepattern.zigbrains.project.settings import com.falsepattern.zigbrains.project.toolchain.LocalZigToolchain +import com.intellij.openapi.project.Project import com.intellij.openapi.util.io.toNioPathOrNull import com.intellij.util.xmlb.annotations.Transient +import kotlin.io.path.isDirectory import kotlin.io.path.pathString data class ZigProjectSettings( @@ -32,11 +34,21 @@ data class ZigProjectSettings( var overrideStdPath: Boolean = false, var explicitPathToStd: String? = null, var toolchainPath: String? = null -) { +): ZigProjectConfigurationProvider.Settings, ZigProjectConfigurationProvider.ToolchainProvider { + override fun apply(project: Project) { + project.zigProjectSettings.loadState(this) + } + @get:Transient @set:Transient - var toolchain: LocalZigToolchain? - get() = toolchainPath?.toNioPathOrNull()?.let { LocalZigToolchain(it) } + override var toolchain: LocalZigToolchain? + get() { + val nioPath = toolchainPath?.toNioPathOrNull() ?: return null + if (!nioPath.isDirectory()) { + return null + } + return LocalZigToolchain(nioPath) + } set(value) { toolchainPath = value?.location?.pathString } diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/settings/ZigProjectSettingsPanel.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/settings/ZigProjectSettingsPanel.kt index 7ffad7ad..601ee937 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/settings/ZigProjectSettingsPanel.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/settings/ZigProjectSettingsPanel.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included @@ -52,7 +52,7 @@ import kotlinx.coroutines.launch import javax.swing.event.DocumentEvent import kotlin.io.path.pathString -class ZigProjectSettingsPanel(private val project: Project?) : Disposable { +class ZigProjectSettingsPanel(private val project: Project) : ZigProjectConfigurationProvider.SettingsPanel { private val direnv = JBCheckBox(ZigBrainsBundle.message("settings.project.label.direnv")).apply { addActionListener { dispatchAutodetect(true) } } @@ -98,7 +98,7 @@ class ZigProjectSettingsPanel(private val project: Project?) : Disposable { if (!force && pathToToolchain.text.isNotBlank()) return val data = UserDataHolderBase() - data.putUserData(LocalZigToolchain.DIRENV_KEY, DirenvCmd.direnvInstalled() && project?.isDefault == false && direnv.isSelected) + data.putUserData(LocalZigToolchain.DIRENV_KEY, !project.isDefault && direnv.isSelected && DirenvCmd.direnvInstalled()) val tc = ZigToolchainProvider.suggestToolchain(project, data) ?: return if (tc !is LocalZigToolchain) { TODO("Implement non-local zig toolchain in config") @@ -109,7 +109,7 @@ class ZigProjectSettingsPanel(private val project: Project?) : Disposable { } } - var data + override var data get() = ZigProjectSettings( direnv.isSelected, stdFieldOverride.isSelected, @@ -125,22 +125,30 @@ class ZigProjectSettingsPanel(private val project: Project?) : Disposable { dispatchUpdateUI() } - fun attach(p: Panel): Unit = with(p) { - val project = project ?: ProjectManager.getInstance().defaultProject + override fun attach(p: Panel): Unit = with(p) { data = project.zigProjectSettings.state - group(ZigBrainsBundle.message("settings.project.group.title")) { + if (project.isDefault) { row(ZigBrainsBundle.message("settings.project.label.toolchain")) { cell(pathToToolchain).resizableColumn().align(AlignX.FILL) - if (DirenvCmd.direnvInstalled() && !project.isDefault) { - cell(direnv) - } } row(ZigBrainsBundle.message("settings.project.label.toolchain-version")) { cell(toolchainVersion) } - row(ZigBrainsBundle.message("settings.project.label.std-location")) { - cell(pathToStd).resizableColumn().align(AlignX.FILL) - cell(stdFieldOverride) + } else { + group(ZigBrainsBundle.message("settings.project.group.title")) { + row(ZigBrainsBundle.message("settings.project.label.toolchain")) { + cell(pathToToolchain).resizableColumn().align(AlignX.FILL) + if (DirenvCmd.direnvInstalled()) { + cell(direnv) + } + } + row(ZigBrainsBundle.message("settings.project.label.toolchain-version")) { + cell(toolchainVersion) + } + row(ZigBrainsBundle.message("settings.project.label.std-location")) { + cell(pathToStd).resizableColumn().align(AlignX.FILL) + cell(stdFieldOverride) + } } } dispatchAutodetect(false) @@ -160,7 +168,7 @@ class ZigProjectSettingsPanel(private val project: Project?) : Disposable { val toolchain = pathToToolchain?.let { LocalZigToolchain(it) } val zig = toolchain?.zig if (zig?.path()?.toFile()?.exists() != true) { - toolchainVersion.text = "" + toolchainVersion.text = "[zig binary not found]" if (!stdFieldOverride.isSelected) { pathToStd.text = "" @@ -168,6 +176,13 @@ class ZigProjectSettingsPanel(private val project: Project?) : Disposable { return } val env = zig.getEnv(project) + if (env == null) { + toolchainVersion.text = "[failed to run zig env]" + if (!stdFieldOverride.isSelected) { + pathToStd.text = "" + } + return + } val version = env.version val stdPath = env.stdPath(toolchain, project) toolchainVersion.text = version diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/settings/ZigProjectSettingsService.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/settings/ZigProjectSettingsService.kt index c1bc2966..0acce1e2 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/settings/ZigProjectSettingsService.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/settings/ZigProjectSettingsService.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/steps/discovery/ZigDiscoverStepsAction.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/steps/discovery/ZigDiscoverStepsAction.kt index 01ad8359..6337e28d 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/steps/discovery/ZigDiscoverStepsAction.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/steps/discovery/ZigDiscoverStepsAction.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/steps/discovery/ZigStepDiscoveryListener.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/steps/discovery/ZigStepDiscoveryListener.kt index 6891d861..42ba2f00 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/steps/discovery/ZigStepDiscoveryListener.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/steps/discovery/ZigStepDiscoveryListener.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included @@ -30,6 +30,7 @@ interface ZigStepDiscoveryListener { enum class ErrorType { MissingToolchain, + MissingZigExe, MissingBuildZig, GeneralError } diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/steps/discovery/ZigStepDiscoveryService.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/steps/discovery/ZigStepDiscoveryService.kt index 1a9d9337..0b704283 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/steps/discovery/ZigStepDiscoveryService.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/steps/discovery/ZigStepDiscoveryService.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included @@ -85,7 +85,9 @@ class ZigStepDiscoveryService(private val project: Project) { "build", "-l", timeoutMillis = currentTimeoutSec * 1000L ) - if (result.checkSuccess(LOG)) { + if (result == null) { + errorReload(ErrorType.MissingZigExe) + } else if (result.checkSuccess(LOG)) { currentTimeoutSec = DEFAULT_TIMEOUT_SEC val lines = result.stdoutLines val steps = ArrayList>() diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/steps/ui/BaseNodeDescriptor.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/steps/ui/BaseNodeDescriptor.kt index f049f74a..aa438662 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/steps/ui/BaseNodeDescriptor.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/steps/ui/BaseNodeDescriptor.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/steps/ui/BuildToolWindowContext.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/steps/ui/BuildToolWindowContext.kt index 76414dcc..3112ec4e 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/steps/ui/BuildToolWindowContext.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/steps/ui/BuildToolWindowContext.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included @@ -166,6 +166,7 @@ class BuildToolWindowContext(private val project: Project): Disposable { withEDTContext { getViewport(project)?.setViewportError(ZigBrainsBundle.message(when(type) { ZigStepDiscoveryListener.ErrorType.MissingToolchain -> "build.tool.window.status.error.missing-toolchain" + ZigStepDiscoveryListener.ErrorType.MissingZigExe -> "build.tool.window.status.error.missing-zig-exe" ZigStepDiscoveryListener.ErrorType.MissingBuildZig -> "build.tool.window.status.error.missing-build-zig" ZigStepDiscoveryListener.ErrorType.GeneralError -> "build.tool.window.status.error.general" }), details) diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/steps/ui/BuildToolWindowFactory.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/steps/ui/BuildToolWindowFactory.kt index 15457cb8..33ba69a8 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/steps/ui/BuildToolWindowFactory.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/steps/ui/BuildToolWindowFactory.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/steps/ui/StepDetails.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/steps/ui/StepDetails.kt index 6893fdec..4fc59f4d 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/steps/ui/StepDetails.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/steps/ui/StepDetails.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/steps/ui/StepNodeDescriptor.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/steps/ui/StepNodeDescriptor.kt index 642ddb9a..654b2bd6 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/steps/ui/StepNodeDescriptor.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/steps/ui/StepNodeDescriptor.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/template/ZigExecutableTemplate.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/template/ZigExecutableTemplate.kt index c0dbb6c7..47425659 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/template/ZigExecutableTemplate.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/template/ZigExecutableTemplate.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/template/ZigInitTemplate.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/template/ZigInitTemplate.kt index 8eb299a7..023e7be2 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/template/ZigInitTemplate.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/template/ZigInitTemplate.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/template/ZigLibraryTemplate.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/template/ZigLibraryTemplate.kt index 8141f199..27b5a013 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/template/ZigLibraryTemplate.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/template/ZigLibraryTemplate.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/template/ZigProjectTemplate.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/template/ZigProjectTemplate.kt index 4ce098f2..db468894 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/template/ZigProjectTemplate.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/template/ZigProjectTemplate.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/toolchain/AbstractZigToolchain.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/toolchain/AbstractZigToolchain.kt index fa0e4864..ec3e3b94 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/toolchain/AbstractZigToolchain.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/toolchain/AbstractZigToolchain.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/toolchain/LocalZigToolchain.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/toolchain/LocalZigToolchain.kt index 667b8e8a..b534ecb7 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/toolchain/LocalZigToolchain.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/toolchain/LocalZigToolchain.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/toolchain/LocalZigToolchainProvider.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/toolchain/LocalZigToolchainProvider.kt index 962cb4c1..a7701ad6 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/toolchain/LocalZigToolchainProvider.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/toolchain/LocalZigToolchainProvider.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/toolchain/ZigToolchainEnvironmentSerializable.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/toolchain/ZigToolchainEnvironmentSerializable.kt index 0ef7c6eb..8bda26d3 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/toolchain/ZigToolchainEnvironmentSerializable.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/toolchain/ZigToolchainEnvironmentSerializable.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/toolchain/ZigToolchainProvider.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/toolchain/ZigToolchainProvider.kt index 8151d1df..57aeb51b 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/toolchain/ZigToolchainProvider.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/toolchain/ZigToolchainProvider.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/toolchain/stdlib/ZigLibraryRootProvider.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/toolchain/stdlib/ZigLibraryRootProvider.kt index 611db01d..e8ce9239 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/toolchain/stdlib/ZigLibraryRootProvider.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/toolchain/stdlib/ZigLibraryRootProvider.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/toolchain/stdlib/ZigSyntheticLibrary.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/toolchain/stdlib/ZigSyntheticLibrary.kt index 73995b5b..7dd8e449 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/toolchain/stdlib/ZigSyntheticLibrary.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/toolchain/stdlib/ZigSyntheticLibrary.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included @@ -76,7 +76,7 @@ private fun getName( project: Project ): String { val tc = state.toolchain ?: return "Zig" - val version = runBlocking { tc.zig.getEnv(project).version } + val version = runBlocking { tc.zig.getEnv(project)?.version } ?: return "Zig" return "Zig $version" } @@ -100,7 +100,7 @@ private fun getRoots( } } if (toolchain != null) { - val stdPath = runBlocking { toolchain.zig.getEnv(project) }.stdPath(toolchain, project) ?: return emptySet() + val stdPath = runBlocking { toolchain.zig.getEnv(project) }?.stdPath(toolchain, project) ?: return emptySet() val roots = stdPath.refreshAndFindVirtualDirectory() ?: return emptySet() return setOf(roots) } diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/toolchain/tools/ZigCompilerTool.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/toolchain/tools/ZigCompilerTool.kt index 2b1342ad..baa0c441 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/toolchain/tools/ZigCompilerTool.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/toolchain/tools/ZigCompilerTool.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included @@ -25,6 +25,7 @@ package com.falsepattern.zigbrains.project.toolchain.tools import com.falsepattern.zigbrains.project.toolchain.AbstractZigToolchain import com.falsepattern.zigbrains.project.toolchain.ZigToolchainEnvironmentSerializable import com.intellij.openapi.project.Project +import kotlinx.serialization.SerializationException import kotlinx.serialization.json.Json import java.nio.file.Path @@ -36,8 +37,13 @@ class ZigCompilerTool(toolchain: AbstractZigToolchain) : ZigTool(toolchain) { return toolchain.pathToExecutable(toolName) } - suspend fun getEnv(project: Project?): ZigToolchainEnvironmentSerializable { - return envJson.decodeFromString(callWithArgs(toolchain.workingDirectory(project), "env").stdout) + suspend fun getEnv(project: Project?): ZigToolchainEnvironmentSerializable? { + val stdout = callWithArgs(toolchain.workingDirectory(project), "env")?.stdout ?: return null + return try { + envJson.decodeFromString(stdout) + } catch (e: SerializationException) { + null + } } } diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/project/toolchain/tools/ZigTool.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/project/toolchain/tools/ZigTool.kt index 6cabb600..2d7c7073 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/project/toolchain/tools/ZigTool.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/project/toolchain/tools/ZigTool.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included @@ -31,12 +31,13 @@ import kotlinx.coroutines.runInterruptible import kotlinx.coroutines.withContext import kotlinx.coroutines.withTimeoutOrNull import java.nio.file.Path +import kotlin.io.path.isRegularFile abstract class ZigTool(val toolchain: AbstractZigToolchain) { abstract val toolName: String - suspend fun callWithArgs(workingDirectory: Path?, vararg parameters: String, timeoutMillis: Long = Long.MAX_VALUE): ProcessOutput { - val cli = createBaseCommandLine(workingDirectory, *parameters) + suspend fun callWithArgs(workingDirectory: Path?, vararg parameters: String, timeoutMillis: Long = Long.MAX_VALUE): ProcessOutput? { + val cli = createBaseCommandLine(workingDirectory, *parameters) ?: return null val (process, exitCode) = withContext(Dispatchers.IO) { val process = cli.createProcess() @@ -59,9 +60,12 @@ abstract class ZigTool(val toolchain: AbstractZigToolchain) { private suspend fun createBaseCommandLine( workingDirectory: Path?, vararg parameters: String - ): GeneralCommandLine { + ): GeneralCommandLine? { + val exe = toolchain.pathToExecutable(toolName) + if (!exe.isRegularFile()) + return null val cli = GeneralCommandLine() - .withExePath(toolchain.pathToExecutable(toolName).toString()) + .withExePath(exe.toString()) .withWorkDirectory(workingDirectory?.toFile()) .withParameters(*parameters) .withCharset(Charsets.UTF_8) diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/shared/MultiConfigurable.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/shared/MultiConfigurable.kt index 4ffa4619..97c22e0a 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/shared/MultiConfigurable.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/shared/MultiConfigurable.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included @@ -27,7 +27,7 @@ import com.intellij.openapi.util.Disposer import com.intellij.ui.dsl.builder.panel import javax.swing.JComponent -abstract class MultiConfigurable(private vararg val configurables: SubConfigurable): Configurable { +abstract class MultiConfigurable(private val configurables: List): Configurable { override fun createComponent(): JComponent? { return panel { for (configurable in configurables) { diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/shared/SubConfigurable.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/shared/SubConfigurable.kt index adf02965..9a83a30d 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/shared/SubConfigurable.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/shared/SubConfigurable.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/shared/ZBFeatures.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/shared/ZBFeatures.kt index f94c4a73..cac3a2e1 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/shared/ZBFeatures.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/shared/ZBFeatures.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/shared/ZigService.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/shared/ZigService.kt index ba6f1f8b..2f6d3b35 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/shared/ZigService.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/shared/ZigService.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/shared/cli/CLIUtil.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/shared/cli/CLIUtil.kt index 8c36d3e1..3836fd34 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/shared/cli/CLIUtil.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/shared/cli/CLIUtil.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/shared/coroutine/CoroutinesUtil.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/shared/coroutine/CoroutinesUtil.kt index c701d65d..878525aa 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/shared/coroutine/CoroutinesUtil.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/shared/coroutine/CoroutinesUtil.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/shared/element/ElementUtil.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/shared/element/ElementUtil.kt index 6ef187c5..63093b45 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/shared/element/ElementUtil.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/shared/element/ElementUtil.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/ZigFileType.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/ZigFileType.kt index 0eefb474..e656f0c8 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/ZigFileType.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/ZigFileType.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/ZigLanguage.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/ZigLanguage.kt index f2b08116..6bd9b4a5 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/ZigLanguage.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/ZigLanguage.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/codeInsight/ZigContext.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/codeInsight/ZigContext.kt index 52068252..b0a66b33 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/codeInsight/ZigContext.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/codeInsight/ZigContext.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/comments/ZigCommenter.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/comments/ZigCommenter.kt index 6871ddfe..a69db9b3 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/comments/ZigCommenter.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/comments/ZigCommenter.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/editing/Assistants.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/editing/Assistants.kt index 05dbd9a4..fdb99e1c 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/editing/Assistants.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/editing/Assistants.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/editing/ZigEnterInQuotedStringHandler.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/editing/ZigEnterInQuotedStringHandler.kt index dcadc9b6..1b16eb64 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/editing/ZigEnterInQuotedStringHandler.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/editing/ZigEnterInQuotedStringHandler.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/editing/ZigEnterInTextBlockHandler.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/editing/ZigEnterInTextBlockHandler.kt index 11492df4..ea5174cc 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/editing/ZigEnterInTextBlockHandler.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/editing/ZigEnterInTextBlockHandler.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/formatter/ZigBlock.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/formatter/ZigBlock.kt index 1fcc1ace..e9ed7e4f 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/formatter/ZigBlock.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/formatter/ZigBlock.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/formatter/ZigFormattingModelBuilder.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/formatter/ZigFormattingModelBuilder.kt index b06d29e2..61bb3ed5 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/formatter/ZigFormattingModelBuilder.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/formatter/ZigFormattingModelBuilder.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/highlighter/ZigColorSettingsPage.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/highlighter/ZigColorSettingsPage.kt index d5274c1b..7662b30e 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/highlighter/ZigColorSettingsPage.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/highlighter/ZigColorSettingsPage.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/highlighter/ZigSyntaxHighlighter.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/highlighter/ZigSyntaxHighlighter.kt index 336aca4c..dedef741 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/highlighter/ZigSyntaxHighlighter.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/highlighter/ZigSyntaxHighlighter.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/highlighter/ZigSyntaxHighlighterFactory.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/highlighter/ZigSyntaxHighlighterFactory.kt index 4ac315c7..182d5435 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/highlighter/ZigSyntaxHighlighterFactory.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/highlighter/ZigSyntaxHighlighterFactory.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/injection/ZigLanguageInjectionPerformer.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/injection/ZigLanguageInjectionPerformer.kt index 7ba075f9..b81cde96 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/injection/ZigLanguageInjectionPerformer.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/injection/ZigLanguageInjectionPerformer.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/injection/ZigStringElementManipulator.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/injection/ZigStringElementManipulator.kt index 7a085649..f47b7b3e 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/injection/ZigStringElementManipulator.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/injection/ZigStringElementManipulator.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/intentions/MakeStringMultiline.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/intentions/MakeStringMultiline.kt index 2d9d6d34..f927336f 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/intentions/MakeStringMultiline.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/intentions/MakeStringMultiline.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/intentions/MakeStringQuoted.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/intentions/MakeStringQuoted.kt index 99a5555f..8c3f83ce 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/intentions/MakeStringQuoted.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/intentions/MakeStringQuoted.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/lexer/ZigHighlightingLexer.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/lexer/ZigHighlightingLexer.kt index 0a9006fc..24bce558 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/lexer/ZigHighlightingLexer.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/lexer/ZigHighlightingLexer.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/lexer/ZigLexerAdapter.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/lexer/ZigLexerAdapter.kt index 101a467b..35510a38 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/lexer/ZigLexerAdapter.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/lexer/ZigLexerAdapter.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/lexerstring/ZigLexerStringAdapter.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/lexerstring/ZigLexerStringAdapter.kt index 3bdc1ffa..2ff17bc8 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/lexerstring/ZigLexerStringAdapter.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/lexerstring/ZigLexerStringAdapter.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/pairing/ZigBraceMatcher.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/pairing/ZigBraceMatcher.kt index ab06048a..0062f64f 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/pairing/ZigBraceMatcher.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/pairing/ZigBraceMatcher.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/pairing/ZigQuoteHandler.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/pairing/ZigQuoteHandler.kt index 5e93e376..f1603a15 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/pairing/ZigQuoteHandler.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/pairing/ZigQuoteHandler.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/parser/ZigElementType.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/parser/ZigElementType.kt index e7c4dcc7..d8ab9e72 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/parser/ZigElementType.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/parser/ZigElementType.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/parser/ZigParserDefinition.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/parser/ZigParserDefinition.kt index 82041d4d..a8161e71 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/parser/ZigParserDefinition.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/parser/ZigParserDefinition.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/parser/ZigTokenSets.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/parser/ZigTokenSets.kt index c1872d2e..88b69d7f 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/parser/ZigTokenSets.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/parser/ZigTokenSets.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/parser/ZigTokenType.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/parser/ZigTokenType.kt index 0a72f4c9..9558a427 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/parser/ZigTokenType.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/parser/ZigTokenType.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/psi/PsiTextUtil.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/psi/PsiTextUtil.kt index f310fbf5..6ec1b2dd 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/psi/PsiTextUtil.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/psi/PsiTextUtil.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/psi/ZigFile.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/psi/ZigFile.kt index 47d6c2a4..94bf96db 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/psi/ZigFile.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/psi/ZigFile.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/psi/impl/mixins/ZigStringLiteralMixinImpl.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/psi/impl/mixins/ZigStringLiteralMixinImpl.kt index c3b5d644..4806c1bf 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/psi/impl/mixins/ZigStringLiteralMixinImpl.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/psi/impl/mixins/ZigStringLiteralMixinImpl.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/psi/mixins/ZigStringLiteralMixin.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/psi/mixins/ZigStringLiteralMixin.kt index 8515d733..29cb7ff7 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/psi/mixins/ZigStringLiteralMixin.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/psi/mixins/ZigStringLiteralMixin.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/util/ZigStringUtil.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/util/ZigStringUtil.kt index aa47fd46..908e2038 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/zig/util/ZigStringUtil.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/zig/util/ZigStringUtil.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/zon/ZonFileType.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/zon/ZonFileType.kt index 9edfe959..02a23f39 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/zon/ZonFileType.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/zon/ZonFileType.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/zon/ZonLanguage.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/zon/ZonLanguage.kt index f21e61ad..62961ac1 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/zon/ZonLanguage.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/zon/ZonLanguage.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/zon/comments/ZonCommenter.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/zon/comments/ZonCommenter.kt index 5912a5ac..0c40a90b 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/zon/comments/ZonCommenter.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/zon/comments/ZonCommenter.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/zon/completion/ZonCompletionContributor.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/zon/completion/ZonCompletionContributor.kt index 5a6b1c56..615b8645 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/zon/completion/ZonCompletionContributor.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/zon/completion/ZonCompletionContributor.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/zon/folding/ZonFoldingBuilder.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/zon/folding/ZonFoldingBuilder.kt index 19cd2ca8..82471cfc 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/zon/folding/ZonFoldingBuilder.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/zon/folding/ZonFoldingBuilder.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/zon/formatter/ZonBlock.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/zon/formatter/ZonBlock.kt index 542a2ed9..5996625c 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/zon/formatter/ZonBlock.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/zon/formatter/ZonBlock.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/zon/formatter/ZonFormattingModelBuilder.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/zon/formatter/ZonFormattingModelBuilder.kt index 0a0e8242..b5ddc75b 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/zon/formatter/ZonFormattingModelBuilder.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/zon/formatter/ZonFormattingModelBuilder.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/zon/highlighting/ZonColorSettingsPage.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/zon/highlighting/ZonColorSettingsPage.kt index 488db942..5354050b 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/zon/highlighting/ZonColorSettingsPage.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/zon/highlighting/ZonColorSettingsPage.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/zon/highlighting/ZonSyntaxHighlighter.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/zon/highlighting/ZonSyntaxHighlighter.kt index 4ebb57cb..d4b3dffc 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/zon/highlighting/ZonSyntaxHighlighter.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/zon/highlighting/ZonSyntaxHighlighter.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/zon/highlighting/ZonSyntaxHighlighterFactory.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/zon/highlighting/ZonSyntaxHighlighterFactory.kt index 192070c0..669cb903 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/zon/highlighting/ZonSyntaxHighlighterFactory.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/zon/highlighting/ZonSyntaxHighlighterFactory.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/zon/lexer/ZonLexerAdapter.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/zon/lexer/ZonLexerAdapter.kt index ce63ecb9..ed153eec 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/zon/lexer/ZonLexerAdapter.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/zon/lexer/ZonLexerAdapter.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/zon/pairing/ZonBraceMatcher.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/zon/pairing/ZonBraceMatcher.kt index f34d078e..7d8ac0ac 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/zon/pairing/ZonBraceMatcher.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/zon/pairing/ZonBraceMatcher.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/zon/pairing/ZonQuoteHandler.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/zon/pairing/ZonQuoteHandler.kt index 786edb3f..7e28bd10 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/zon/pairing/ZonQuoteHandler.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/zon/pairing/ZonQuoteHandler.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/zon/parser/ZonElementType.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/zon/parser/ZonElementType.kt index e32c6616..51063c8a 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/zon/parser/ZonElementType.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/zon/parser/ZonElementType.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/zon/parser/ZonParserDefinition.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/zon/parser/ZonParserDefinition.kt index a10f95d8..47ad226a 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/zon/parser/ZonParserDefinition.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/zon/parser/ZonParserDefinition.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/zon/parser/ZonTokenSets.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/zon/parser/ZonTokenSets.kt index 1f852152..5f0a19ab 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/zon/parser/ZonTokenSets.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/zon/parser/ZonTokenSets.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/zon/parser/ZonTokenType.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/zon/parser/ZonTokenType.kt index 2100d982..26817092 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/zon/parser/ZonTokenType.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/zon/parser/ZonTokenType.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/zon/psi/ZonFile.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/zon/psi/ZonFile.kt index bc7befc7..9c862fd4 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/zon/psi/ZonFile.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/zon/psi/ZonFile.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/zon/psi/impl/mixins/ZonEntryMixinImpl.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/zon/psi/impl/mixins/ZonEntryMixinImpl.kt index 464372f8..4fa96526 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/zon/psi/impl/mixins/ZonEntryMixinImpl.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/zon/psi/impl/mixins/ZonEntryMixinImpl.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/zon/psi/impl/mixins/ZonIdentifierMixinImpl.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/zon/psi/impl/mixins/ZonIdentifierMixinImpl.kt index 7265a207..fab34d04 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/zon/psi/impl/mixins/ZonIdentifierMixinImpl.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/zon/psi/impl/mixins/ZonIdentifierMixinImpl.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/zon/psi/mixins/ZonEntryMixin.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/zon/psi/mixins/ZonEntryMixin.kt index c655a903..03a0507d 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/zon/psi/mixins/ZonEntryMixin.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/zon/psi/mixins/ZonEntryMixin.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/zon/psi/mixins/ZonIdentifierMixin.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/zon/psi/mixins/ZonIdentifierMixin.kt index 9066ec8e..a3a2fda4 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/zon/psi/mixins/ZonIdentifierMixin.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/zon/psi/mixins/ZonIdentifierMixin.kt @@ -1,7 +1,7 @@ /* * This file is part of ZigBrains. * - * Copyright (C) 2023-2024 FalsePattern + * Copyright (C) 2023-2025 FalsePattern * All Rights Reserved * * The above copyright notice and this permission notice shall be included diff --git a/core/src/main/resources/META-INF/zigbrains-core.xml b/core/src/main/resources/META-INF/zigbrains-core.xml index 3a333a95..0a005035 100644 --- a/core/src/main/resources/META-INF/zigbrains-core.xml +++ b/core/src/main/resources/META-INF/zigbrains-core.xml @@ -184,13 +184,12 @@ - - + diff --git a/core/src/main/resources/intentionDescriptions/MakeStringMultiline/description.html b/core/src/main/resources/intentionDescriptions/MakeStringMultiline/description.html index 29e2ccbe..f93ca596 100644 --- a/core/src/main/resources/intentionDescriptions/MakeStringMultiline/description.html +++ b/core/src/main/resources/intentionDescriptions/MakeStringMultiline/description.html @@ -1,7 +1,7 @@ + - zigbrains.lsp.Bundle + + + diff --git a/lsp/src/main/resources/zigbrains/lsp/Bundle.properties b/lsp/src/main/resources/zigbrains/lsp/Bundle.properties new file mode 100644 index 00000000..a23813e7 --- /dev/null +++ b/lsp/src/main/resources/zigbrains/lsp/Bundle.properties @@ -0,0 +1,67 @@ +settings.group.title=ZLS Settings +settings.zls-path.label=Executable path +settings.zls-path.tooltip=Path to the ZLS Binary +settings.zls-path.browse.title=Path to the ZLS Binary +settings.zls-config-path.label=Config path +settings.zls-config-path.tooltip=Leave empty to use built-in config generated from the settings below +settings.zls-config-path.browse.title=Path to the Custom ZLS Config File (Optional) +settings.zls-path.use-direnv.label=Use direnv +settings.inlay-hints-group.label=Inlay Hints +settings.inlay-hints-enable.label=Enable +settings.inlay-hints-enable.tooltip=Toggle this to enable/disable all inlay hints +settings.enable_snippets.label=Enable snippets +settings.enable_snippets.tooltip=Enables snippet completions when the client also supports them +settings.enable_argument_placeholders.label=Enable argument placeholders +settings.enable_argument_placeholders.tooltip=Whether to enable function argument placeholder completions +settings.completion_label_details.label=Completion label details +settings.completion_label_details.tooltip=Whether to show the function signature in completion results. May improve readability in some editors when disabled +settings.enable_build_on_save.label=Enable build on save +settings.enable_build_on_save.tooltip=Whether to enable build-on-save diagnostics. Will be automatically enabled if the `build.zig` has declared a 'check' step.\n\nFor more infromation, checkout the [Build-On-Save](https://zigtools.org/zls/guides/build-on-save/) Guide. +settings.build_on_save_args.label=Build on save args +settings.build_on_save_args.tooltip=Specify which arguments should be passed to Zig when running build-on-save.\n\nIf the `build.zig` has declared a 'check' step, it will be preferred over the default 'install' step. +settings.semantic_tokens.label=Semantic tokens +settings.semantic_tokens.tooltip=Set level of semantic tokens. `partial` only includes information that requires semantic analysis. +settings.inlay_hints_show_variable_type_hints.label=Show variable type hints +settings.inlay_hints_show_variable_type_hints.tooltip=Enable inlay hints for variable types +settings.inlay_hints_show_struct_literal_field_type.label=Show struct literal field type +settings.inlay_hints_show_struct_literal_field_type.tooltip=Enable inlay hints for fields in struct and union literals +settings.inlay_hints_show_parameter_name.label=Show parameter name +settings.inlay_hints_show_parameter_name.tooltip=Enable inlay hints for parameter names +settings.inlay_hints_show_builtin.label=Show builtin +settings.inlay_hints_show_builtin.tooltip=Enable inlay hints for builtin functions +settings.inlay_hints_exclude_single_argument.label=Exclude single argument +settings.inlay_hints_exclude_single_argument.tooltip=Don't show inlay hints for single argument calls +settings.inlay_hints_hide_redundant_param_names.label=Hide redundant param names +settings.inlay_hints_hide_redundant_param_names.tooltip=Hides inlay hints when parameter name matches the identifier (e.g. `foo: foo`) +settings.inlay_hints_hide_redundant_param_names_last_token.label=Hide redundant param names last token +settings.inlay_hints_hide_redundant_param_names_last_token.tooltip=Hides inlay hints when parameter name matches the last token of a parameter node (e.g. `foo: bar.foo`, `foo: &foo`) +settings.warn_style.label=Warn style +settings.warn_style.tooltip=Enables warnings for style guideline mismatches +settings.highlight_global_var_declarations.label=Highlight global var declarations +settings.highlight_global_var_declarations.tooltip=Whether to highlight global var declarations +settings.skip_std_references.label=Skip std references +settings.skip_std_references.tooltip=When true, skips searching for references in the standard library. Improves lookup speed for functions in user's code. Renaming and go-to-definition will continue to work as is +settings.prefer_ast_check_as_child_process.label=Prefer AST check as child process +settings.prefer_ast_check_as_child_process.tooltip=Favor using `zig ast-check` instead of the builtin one +settings.builtin_path.label=Builtin path +settings.builtin_path.tooltip=Override the path to 'builtin' module. Automatically resolved if unset. +settings.build_runner_path.label=Build runner path +settings.build_runner_path.tooltip=Specify a custom build runner to resolve build system information. +settings.global_cache_path.label=Global cache path +settings.global_cache_path.tooltip=Path to a directory that will be used as zig's cache. Will default to `${KnownFolders.Cache}/zls`. +configurable.name.zls.settings=ZLS Settings +notification.group.zigbrains-lsp=ZigBrains LSP Integration +notification.message.could-not-detect.content=Could not detect ZLS binary, please configure it +notification.message.zls-exe-path-invalid.content=ZLS executable path could not be parsed: {0} +notification.message.zls-exe-not-exists.content=ZLS executable does not exist: {0} +notification.message.zls-exe-not-executable.content=ZLS executable is not an executable file: {0} +notification.message.zls-config-not-exists.content=ZLS config file does not exist: {0} +notification.message.zls-config-not-file.content=ZLS config file is not a regular file: {0} +notification.message.zls-config-path-invalid.content=ZLS config path could not be parted: {0} +notification.message.zls-config-autogen-failed.content=Failed to autogenerate ZLS config from toolchain +progress.title.create-connection-provider=Creating ZLS connection provider +progress.title.validate=Validating ZLS +# suppress inspection "UnusedProperty" +lsp.zls.name=Zig Language Server +# suppress inspection "UnusedProperty" +lsp.zls.description=The Zig Language Server, via ZigBrains diff --git a/settings.gradle.kts b/settings.gradle.kts index c8123580..0c52557a 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -4,4 +4,5 @@ plugins { rootProject.name = "ZigBrains" include("core") +include("lsp") include("cidr") diff --git a/src/main/resources/META-INF/plugin.xml b/src/main/resources/META-INF/plugin.xml index 34748968..5258b9f7 100644 --- a/src/main/resources/META-INF/plugin.xml +++ b/src/main/resources/META-INF/plugin.xml @@ -17,6 +17,11 @@ dynamic="true" name="zlsConfigProvider" /> +