struct LSP::FormattingOptions

Overview

Value-object describing what options formatting should use.

Included Modules

Defined in:

requests/language_features/formatting.cr

Constructors

Instance Method Summary

Macros inherited from module JSON::Serializable

json_discriminator(field, mapping, *, default = nil) json_discriminator

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]
def self.new(**args) #

[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.


[View source]
def insert_final_newline=(insert_final_newline : Bool | Nil) #

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


[View source]
def insert_spaces : Bool #

Prefer spaces over tabs.


[View source]
def insert_spaces=(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_newlines : Bool | Nil #

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


[View source]
def trim_final_newlines=(trim_final_newlines : Bool | Nil) #

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


[View source]
def trim_trailing_whitespace : Bool | Nil #

Trim trailing whitespace on a line.


[View source]
def trim_trailing_whitespace=(trim_trailing_whitespace : Bool | Nil) #

Trim trailing whitespace on a line.


[View source]