class LSProtocol::FormattingOptions

Overview

Value-object describing what options formatting should use.

Included Modules

Defined in:

lsprotocol/types.cr

Constructors

Instance Method Summary

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) #

[View source]
def self.new(pull : JSON::PullParser) #

[View source]

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


[View source]
def insert_spaces : Bool #

Prefer spaces over tabs.


[View source]
def tab_size : UInt32 #

Size of a tab in spaces.


[View source]
def trim_final_newlines : Bool | Nil #

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

@since 3.15.0


[View source]
def trim_trailing_whitespace : Bool | Nil #

Trim trailing whitespace on a line.

@since 3.15.0


[View source]