<p dir="auto">A minor observation about an otherwise great feature! Using the Insiders build, the following Lua code causes weird folding:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="function someFunc()

    local longString = [[this is a long
string that spans multiple lines
and has some weird folding]]

    print longString
end"><pre class="notranslate"><code class="notranslate">function someFunc()

    local longString = [[this is a long
string that spans multiple lines
and has some weird folding]]

    print longString
end
</code></pre></div>
<p dir="auto">You'll notice that a + shows up on the same "function someFunc()" line <em>and</em> on the last line of the longString declaration. The first + folds up to the declaration line and the second + folds the rest of the function.</p>
<p dir="auto">The current implementation of folding uses an indentation based folding strategy that is unaware of the language it works on. Knowledge on the underlying language allows us to solve the following requests:</p>
<ul dir="auto">
<li>[folding] Cannot code fold empty functions <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="135791496" data-permission-text="Title is private" data-url="https://github.com/microsoft/vscode/issues/3349" data-hovercard-type="issue" data-hovercard-url="/microsoft/vscode/issues/3349/hovercard" href="https://github.com/microsoft/vscode/issues/3349">#3349</a></li>
<li>[folding] Collapse ending brace to the same line <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="135795757" data-permission-text="Title is private" data-url="https://github.com/microsoft/vscode/issues/3352" data-hovercard-type="issue" data-hovercard-url="/microsoft/vscode/issues/3352/hovercard" href="https://github.com/microsoft/vscode/issues/3352">#3352</a></li>
<li>[folding] Folded block comments should show */ <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="135792155" data-permission-text="Title is private" data-url="https://github.com/microsoft/vscode/issues/3350" data-hovercard-type="issue" data-hovercard-url="/microsoft/vscode/issues/3350/hovercard" href="https://github.com/microsoft/vscode/issues/3350">#3350</a></li>
<li>[folding] should not fold whitespace after function <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="135796670" data-permission-text="Title is private" data-url="https://github.com/microsoft/vscode/issues/3353" data-hovercard-type="issue" data-hovercard-url="/microsoft/vscode/issues/3353/hovercard" href="https://github.com/microsoft/vscode/issues/3353">#3353</a></li>
<li>[folding] Add code folding for markdown based on heading level <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="135790053" data-permission-text="Title is private" data-url="https://github.com/microsoft/vscode/issues/3347" data-hovercard-type="issue" data-hovercard-url="/microsoft/vscode/issues/3347/hovercard" href="https://github.com/microsoft/vscode/issues/3347">#3347</a></li>
<li>[folding] [lua] Weird code folding with Lua <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="137648390" data-permission-text="Title is private" data-url="https://github.com/microsoft/vscode/issues/3602" data-hovercard-type="issue" data-hovercard-url="/microsoft/vscode/issues/3602/hovercard" href="https://github.com/microsoft/vscode/issues/3602">#3602</a></li>
<li>[folding] Collapse code block ignore comments inside this block <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="139890518" data-permission-text="Title is private" data-url="https://github.com/microsoft/vscode/issues/3957" data-hovercard-type="issue" data-hovercard-url="/microsoft/vscode/issues/3957/hovercard" href="https://github.com/microsoft/vscode/issues/3957">#3957</a></li>
<li>[folding] Code Folding: support golang multiline strings <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="151930846" data-permission-text="Title is private" data-url="https://github.com/microsoft/vscode/issues/5994" data-hovercard-type="issue" data-hovercard-url="/microsoft/vscode/issues/5994/hovercard" href="https://github.com/microsoft/vscode/issues/5994">#5994</a></li>
<li>[folding] Optionally fold chained method calls <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="157350400" data-permission-text="Title is private" data-url="https://github.com/microsoft/vscode/issues/6991" data-hovercard-type="issue" data-hovercard-url="/microsoft/vscode/issues/6991/hovercard" href="https://github.com/microsoft/vscode/issues/6991">#6991</a></li>
</ul>