diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 00000000..a0113cdf --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,2 @@ +patreon: falsepattern +ko-fi: falsepattern \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 13bf889c..85717ae7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,8 @@ Changelog structure reference: ## [Unreleased] +## [20.0.0] + ### Added - Debugging @@ -30,6 +32,18 @@ Changelog structure reference: - Most of the internals have been rewritten to be fully asynchronous, so freezes should happen way less +## [19.3.0] + +### Added + +- Toolchains, Run Configurations + - [Direnv](https://github.com/direnv/direnv) support + +### Fixed + +- Zig + - Missing description for string conversion intentions + ## [19.2.0] ### Added diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 00000000..89090b12 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,53 @@ +# Code of Merit + +1. The project creators, lead developers, core team, constitute + the managing members of the project and have final say in every decision + of the project, technical or otherwise, including overruling previous decisions. + There are no limitations to this decisional power. + +2. Contributions are an expected result of your membership on the project. + Don't expect others to do your work or help you with your work forever. + +3. All members have the same opportunities to seek any challenge they want + within the project. + +4. Authority or position in the project will be proportional + to the accrued contribution. Seniority must be earned. + +5. Software is evolutive: the better implementations must supersede lesser + implementations. Technical advantage is the primary evaluation metric. + +6. This is a space for technical prowess; topics outside of the project + will not be tolerated. + +7. Non technical conflicts will be discussed in a separate space. Disruption + of the project will not be allowed. + +8. Individual characteristics, including but not limited to, + body, sex, sexual preference, race, language, religion, nationality, + or political preferences are irrelevant in the scope of the project and + will not be taken into account concerning your value or that of your contribution + to the project. + +9. Discuss or debate the idea, not the person. + +10. There is no room for ambiguity: Ambiguity will be met with questioning; + further ambiguity will be met with silence. It is the responsibility + of the originator to provide requested context. + +11. If something is illegal outside the scope of the project, it is illegal + in the scope of the project. This Code of Merit does not take precedence over + governing law. + +12. This Code of Merit governs the technical procedures of the project not the + activities outside of it. + +13. Participation on the project equates to agreement of this Code of Merit. + +14. No objectives beyond the stated objectives of this project are relevant + to the project. Any intent to deviate the project from its original purpose + of existence will constitute grounds for remedial action which may include + expulsion from the project. + +This document is adapted from the Code of Merit, version 1.0. +See: https://codeofmerit.org/. diff --git a/core/src/main/kotlin/com/falsepattern/zigbrains/lsp/ZigLanguageServerFactory.kt b/core/src/main/kotlin/com/falsepattern/zigbrains/lsp/ZigLanguageServerFactory.kt index 7e648348..1f10bebe 100644 --- a/core/src/main/kotlin/com/falsepattern/zigbrains/lsp/ZigLanguageServerFactory.kt +++ b/core/src/main/kotlin/com/falsepattern/zigbrains/lsp/ZigLanguageServerFactory.kt @@ -29,11 +29,15 @@ import com.intellij.openapi.project.Project import com.intellij.openapi.util.Key import com.intellij.platform.ide.progress.ModalTaskOwner import com.intellij.platform.ide.progress.runWithModalProgressBlocking +import com.intellij.psi.PsiFile import com.intellij.util.application import com.redhat.devtools.lsp4ij.LanguageServerEnablementSupport import com.redhat.devtools.lsp4ij.LanguageServerFactory import com.redhat.devtools.lsp4ij.LanguageServerManager import com.redhat.devtools.lsp4ij.ServerStatus +import com.redhat.devtools.lsp4ij.client.features.LSPClientFeatures +import com.redhat.devtools.lsp4ij.client.features.LSPFormattingFeature +import com.redhat.devtools.lsp4ij.client.features.LSPInlayHintFeature import com.redhat.devtools.lsp4ij.server.StreamConnectionProvider import kotlinx.coroutines.launch import kotlinx.coroutines.runBlocking @@ -51,6 +55,22 @@ class ZigLanguageServerFactory: LanguageServerFactory, LanguageServerEnablementS } } + @Suppress("UnstableApiUsage") + override fun createClientFeatures(): LSPClientFeatures { + val features = LSPClientFeatures() + features.formattingFeature = object: LSPFormattingFeature() { + override fun isExistingFormatterOverrideable(file: PsiFile): Boolean { + return true + } + } + features.inlayHintFeature = object: LSPInlayHintFeature() { + override fun isEnabled(file: PsiFile): Boolean { + return features.project.zlsSettings.state.inlayHints + } + } + return features + } + override fun isEnabled(project: Project): Boolean { return (project.getUserData(ENABLED_KEY) ?: true) && project.zlsSettings.validate() } diff --git a/gradle.properties b/gradle.properties index a82b85d0..3efac3bd 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ pluginName=ZigBrains pluginRepositoryUrl=https://github.com/FalsePattern/ZigBrains -pluginVersion=20.0.0-dev +pluginVersion=20.0.0 pluginSinceBuild=242 pluginUntilBuild=242.*