-
Notifications
You must be signed in to change notification settings - Fork 808
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How are the startCharacter and endCharacter properties on folding ranges defined? #1198
Comments
@aeschli can you please clarify. Thanks! |
startLine/startCharacter - endLine/endCharacter define a Range. That's the range that is hidden when that folding range is collapsed. |
@aeschli Right, I think my question wasn't clear enough: Are the |
Based on them defaulting to the length of the relevant line, it should be the column of the line. |
Yes, character is the offset in the line. In LSP all positions are line/character (like line/column except that columns typically start with 1, while characters start with 0) You can say it folds after the last character of the first line. That's why the comment says: |
I see, thank you for your explanation. I will close this issue. |
We are currently in the process of implementing folding support for Xtext. (eclipse/xtext-core#1672)
There has been some discussion regarding the use of the
startCharacter
andendCharacter
properties of the FoldingRange. It's not quite clear how exactly these are defined. Especially since I couldn't find any reference implementation and vscode only uses line based folding, so I couldn't test it either.Could someone please give some clarification on how these are defined? An actual example would be highly appreciated.
The text was updated successfully, but these errors were encountered: