struct

LSP::FormattingOptions

Inherits JSON::Serializable::Unmapped < JSON::Serializable < LSP::Initializer < Struct < Value < Object

Value-object describing what options formatting should use.

Constructors

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.

Source
insert_final_newline=(insert_final_newline : Bool | Nil)

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

Source
insert_spaces

Prefer spaces over tabs.

Source
insert_spaces=(insert_spaces : Bool)

Prefer spaces over tabs.

Source
tab_size

Size of a tab in spaces.

Source
tab_size=(tab_size : Int32)

Size of a tab in spaces.

Source
trim_final_newlines

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

Source
trim_final_newlines=(trim_final_newlines : Bool | Nil)

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

Source
trim_trailing_whitespace

Trim trailing whitespace on a line.

Source
trim_trailing_whitespace=(trim_trailing_whitespace : Bool | Nil)

Trim trailing whitespace on a line.

Source