class LSProtocol::FormattingOptions
- LSProtocol::FormattingOptions
- Reference
- Object
Overview
Value-object describing what options formatting should use.
Included Modules
- JSON::Serializable
Defined in:
lsprotocol/types.crConstructors
- .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)
- .new(pull : JSON::PullParser)
Instance Method Summary
-
#insert_final_newline : Bool | Nil
Insert a newline character at the end of the file if one does not exist.
-
#insert_spaces : Bool
Prefer spaces over tabs.
-
#tab_size : UInt32
Size of a tab in spaces.
-
#trim_final_newlines : Bool | Nil
Trim all newlines after the final newline at the end of the file.
-
#trim_trailing_whitespace : Bool | Nil
Trim trailing whitespace on a line.
Constructor Detail
def self.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)
#
Instance Method Detail
def insert_final_newline : Bool | Nil
#
Insert a newline character at the end of the file if one does not exist.
@since 3.15.0
def trim_final_newlines : Bool | Nil
#
Trim all newlines after the final newline at the end of the file.
@since 3.15.0