Class RNCFormatting
java.lang.Object
org.eclipse.lemminx.extensions.relaxng.grammar.rnc.format.RNCFormatting
Entry point for RNC (RELAX NG Compact Syntax) document formatting.
Delegates to RNCFormatterDocument which performs scanner-based
formatting by analyzing whitespace between tokens and producing
TextEdits where the actual whitespace differs from the expected
formatting.
Use case: invoked by the LSP formatting request
(textDocument/formatting) when the user formats an .rnc
file. The formatting respects the user's SharedSettings for
indentation (tabs vs spaces, tab size), trailing whitespace, and final
newline preferences.
Example — before formatting:
start=element root{text}
After formatting:
start = element root {
text
}
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionList<? extends org.eclipse.lsp4j.TextEdit> format(TextDocument textDocument, SharedSettings sharedSettings, RNCFormattingSettings rncFormattingSettings) Formats the given RNC document and returns a list ofTextEdits that, when applied, produce a well-formatted document.
-
Constructor Details
-
RNCFormatting
public RNCFormatting()
-
-
Method Details