feat(expert): fold multiline bitstrings - #897
Merged
doorgan merged 1 commit intoSep 24, 2026
Merged
Conversation
doorgan
force-pushed
the
issue/146-bitstring-folding
branch
from
September 24, 2026 19:41
a903d35 to
03471ed
Compare
doorgan
enabled auto-merge (squash)
September 24, 2026 19:41
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
adds folding for multiline
<< ... >>literals and patterns, covering the bitstring item in #146.reuses the existing line/closing metadata collector for anonymous functions, with no extra AST traversal. the closing
>>line stays visible, matching existing block folding. single-line, empty and unclosed bitstrings are skipped; sigil contents don't produce extra bitstring folds.includes six regression tests for literals, nested/typed segments, patterns, skipped inputs and sigil contents. three tests failed before the fix; all 31 folding tests pass after it.
validation on macOS, Elixir 1.20.3 / OTP 29.0.5, from
apps/expert:ERL_FLAGS='-start_epmd false -epmd_module Elixir.Forge.EPMD' mix test --warnings-as-errors— 857 passed, 12 excludedmix compile --warnings-as-errorsmix credo --strictmix dialyzermix format --check-formatted lib/expert/provider/handlers/code_folding.ex test/expert/provider/handlers/code_folding_test.exsgit diff --checkbased directly on main, independent of #883. both touch the same folding handler, so a small rebase may be needed depending on merge order. other unchecked items in #146 are out of scope.