struct LSP::FormattingOptions

Included Modules

Defined in:

lsp/protocol/formatting_options.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(trim_trailing_whitespace : Bool | Nil, insert_final_new_line : Bool | Nil, trim_final_new_lines : Bool | Nil, insert_spaces : Bool, tab_size : Int32) #

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

[View source]

Instance Method Detail

def 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


[View source]
def 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


[View source]
def insert_spaces=(insert_spaces : Bool) #

Prefer spaces over tabs.


[View source]
def insert_spaces? : Bool #

Prefer spaces over tabs.


[View source]
def tab_size : Int32 #

Size of a tab in spaces.


[View source]
def tab_size=(tab_size : Int32) #

Size of a tab in spaces.


[View source]
def 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


[View source]
def trim_final_new_lines? : 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=(trim_trailing_whitespace : Bool | Nil) #

Trim trailing whitespace on a line.

@since 3.15.0


[View source]
def trim_trailing_whitespace? : Bool | Nil #

Trim trailing whitespace on a line.

@since 3.15.0


[View source]