struct

LSP::FormattingOptions

Inherits JSON::Serializable < Struct < Value < Object

Constructors

new(trim_trailing_whitespace : Bool | Nil, insert_final_new_line : Bool | Nil, trim_final_new_lines : Bool | Nil, insert_spaces : Bool, tab_size : Int32)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

insert_final_new_line=(insert_final_new_line : Bool | Nil)

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

@since 3.15.0

Source
insert_final_new_line?

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

@since 3.15.0

Source
insert_spaces=(insert_spaces : Bool)

Prefer spaces over tabs.

Source
insert_spaces?

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_new_lines=(trim_final_new_lines : Bool | Nil)

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

@since 3.15.0

Source
trim_final_new_lines?

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

@since 3.15.0

Source
trim_trailing_whitespace=(trim_trailing_whitespace : Bool | Nil)

Trim trailing whitespace on a line.

@since 3.15.0

Source
trim_trailing_whitespace?

Trim trailing whitespace on a line.

@since 3.15.0

Source