class

LSProtocol::FormattingOptions

Inherits JSON::Serializable / Reference / Object

Value-object describing what options formatting should use.

Constructors

new(insert_spaces : Bool | Nil, tab_size : UInt32 | Nil, insert_final_newline : Bool | Nil = nil, trim_final_newlines : Bool | Nil = nil, trim_trailing_whitespace : Bool | Nil = nil)
Source
new(pull : JSON::PullParser)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

insert_final_newline

Insert a newline character at the end of the file if one does not exist.

@since 3.15.0

Source
insert_spaces

Prefer spaces over tabs.

Source
tab_size

Size of a tab in spaces.

Source
trim_final_newlines

Trim all newlines after the final newline at the end of the file.

@since 3.15.0

Source
trim_trailing_whitespace

Trim trailing whitespace on a line.

@since 3.15.0

Source