You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature request: A way for languages or language servers to bypass the canFormat check #424
In AbstractLSPFormattingService, canFormat checks for the presence of a LanguageFormatting implementation for a language, and if present, doesn't invoke the LSP formatter.
In the case of ZigBrains, I used both the LSP formatter for manual formatting via ZLS when invoking the formatting action, as well as the intellij autoformatter for correct auto-indentation when creating new lines or code blocks. If the zigbrains lang.formatter is removed, auto-indentation breaks, but the ZLS formatter functions.
Activity
angelozerr commentedon Jul 17, 2024
Same issue than #388
FalsePattern commentedon Jul 17, 2024
As a temporary workaround until this is solved, I have added a proxy service that bypasses the
AbstractLSPFormattingService.canFormatchecks for Zig: https://github.com/FalsePattern/ZigBrains/blob/master/modules/zig/src/main/java/com/falsepattern/zigbrains/zig/formatter/ZigAbstractLSPFormattingServiceProxy.java, this seems to fix the issue for ZB.angelozerr commentedon Oct 2, 2024
Duplicate of #388 and covered with the current PR #543