-
Going through the documentation it seems that Langium Formatting tools doesn't support prettier style dynamic layouts based on the print width. Is my understanding correct or am I missing something? If it doesn't support that now, are there any plans to add such capability in the future? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hey @brsanthu, print width style formatting would require a second pass through the document after applying the first formatting (even if only in memory) to figure out where the tokens exceed the print width to correctly calculate further edits. I'm not sure how well this fits into the existing API. In theory you could extend the
Nobody brought this topic up until now, so it wasn't even on our minds :) No plans to add it yet. I plan to refactor the formatter due to various issues that are inherent to the current feature architecture, but there's not due date for that yet. |
Beta Was this translation helpful? Give feedback.
Hey @brsanthu,
print width style formatting would require a second pass through the document after applying the first formatting (even if only in memory) to figure out where the tokens exceed the print width to correctly calculate further edits. I'm not sure how well this fits into the existing API. In theory you could extend the
AbstractFormatter
to do exactly that after the "normal" formatting operation.Nobody brought this topic up until now, so it wasn't even on our minds :) No plans to add it yet. I plan to refactor the formatter due to various issues that are inherent to the current feature a…