class Savi::Server

Defined in:

savi/server.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(stdin : IO = STDIN, stdout : IO = STDOUT, stderr : IO = STDERR) #

[View source]

Instance Method Detail

def handle(msg : LSP::Message::Initialize) #

When told to initialize, respond with info about our capabilities.


[View source]
def handle(msg : LSP::Message::Initialized) #

When told that we're free to be initialized, do so.


[View source]
def handle(msg : LSP::Message::DidChangeConfiguration) #

When told that we're free to be initialized, do so.


[View source]
def handle(msg : LSP::Message::Shutdown) #

When asked to shut down, respond in the affirmative immediately.


[View source]
def handle(msg : LSP::Message::Exit) #

When told that we're free to exit gracefully, do so.


[View source]
def handle(msg : LSP::Message::DidOpen) #

When a text document is opened, store it in our source overrides.


[View source]
def handle(msg : LSP::Message::DidChange) #

When a text document is changed, update it in our source overrides.


[View source]
def handle(msg : LSP::Message::DidClose) #

When a text document is closed, remove it from our source overrides.


[View source]
def handle(msg : LSP::Message::DidSave) #

When a text document is saved, do nothing.


[View source]
def handle(msg : LSP::Message::Hover) #

TODO Get Hover working again, in the presence of package manifests.


[View source]
def handle(req : LSP::Message::Formatting) #

[View source]
def handle(req : LSP::Message::RangeFormatting) #

[View source]
def handle(req : LSP::Message::OnTypeFormatting) #

[View source]
def handle(req : LSP::Message::Completion) #

TODO Proper completion support.


[View source]
def handle(msg) #

All other messages are unhandled - just print them for debugging purposes.


[View source]
def run #

[View source]
def send_diagnostics(filename : String, content : String | Nil = nil) #

[View source]
def setup #

[View source]