Versions in this module Expand all Collapse all v0 v0.0.2 Apr 25, 2026 v0.0.1 Apr 11, 2026 Changes in this version + func FindFirstNonWhitespaceColumn(startPos int, endPos int, sourceFile *ast.SourceFile, ...) int + func FormatDocument(ctx context.Context, sourceFile *ast.SourceFile) []core.TextChange + func FormatNodeGivenIndentation(ctx context.Context, node *ast.Node, file *ast.SourceFile, ...) []core.TextChange + func FormatOnClosingCurly(ctx context.Context, sourceFile *ast.SourceFile, position int) []core.TextChange + func FormatOnEnter(ctx context.Context, sourceFile *ast.SourceFile, position int) []core.TextChange + func FormatOnOpeningCurly(ctx context.Context, sourceFile *ast.SourceFile, position int) []core.TextChange + func FormatOnSemicolon(ctx context.Context, sourceFile *ast.SourceFile, position int) []core.TextChange + func FormatSelection(ctx context.Context, sourceFile *ast.SourceFile, start int, end int) []core.TextChange + func FormatSpan(ctx context.Context, span core.TextRange, file *ast.SourceFile, ...) []core.TextChange + func GetContainingList(node *ast.Node, sourceFile *ast.SourceFile) *ast.NodeList + func GetFormatCodeSettingsFromContext(ctx context.Context) lsutil.FormatCodeSettings + func GetIndentation(position int, sourceFile *ast.SourceFile, options lsutil.FormatCodeSettings, ...) int + func GetIndentationForNode(n *ast.Node, ignoreActualIndentationRange *core.TextRange, ...) int + func GetLineStartPositionForPosition(position int, sourceFile *ast.SourceFile) int + func GetNewLineOrDefaultFromContext(ctx context.Context) string + func NodeWillIndentChild(settings lsutil.FormatCodeSettings, parent *ast.Node, child *ast.Node, ...) bool + func ShouldIndentChildNode(settings lsutil.FormatCodeSettings, parent *ast.Node, child *ast.Node, ...) bool + func WithFormatCodeSettings(ctx context.Context, options lsutil.FormatCodeSettings, newLine string) context.Context + type FormatRequestKind int + const FormatRequestKindFormatDocument + const FormatRequestKindFormatOnClosingCurlyBrace + const FormatRequestKindFormatOnEnter + const FormatRequestKindFormatOnOpeningCurlyBrace + const FormatRequestKindFormatOnSemicolon + const FormatRequestKindFormatSelection + type FormattingContext struct + FormattingRequestKind FormatRequestKind + Options lsutil.FormatCodeSettings + SourceFile *ast.SourceFile + func NewFormattingContext(file *ast.SourceFile, kind FormatRequestKind, ...) *FormattingContext + func (this *FormattingContext) ContextNodeAllOnSameLine() bool + func (this *FormattingContext) ContextNodeBlockIsOnOneLine() bool + func (this *FormattingContext) NextNodeAllOnSameLine() bool + func (this *FormattingContext) NextNodeBlockIsOnOneLine() bool + func (this *FormattingContext) TokensAreOnSameLine() bool + func (this *FormattingContext) UpdateContext(cur TextRangeWithKind, curParent *ast.Node, next TextRangeWithKind, ...) + type LineAction int + const LineActionLineAdded + const LineActionLineRemoved + const LineActionNone + type RulesPosition int + const RulesPositionContextRulesAny + const RulesPositionContextRulesSpecific + const RulesPositionNoContextRulesAny + const RulesPositionNoContextRulesSpecific + const RulesPositionStopRulesAny + const RulesPositionStopRulesSpecific + type TextRangeWithKind struct + Kind ast.Kind + Loc core.TextRange + func NewTextRangeWithKind(pos int, end int, kind ast.Kind) TextRangeWithKind