class LSP::Server

Overview

This is the class for a language server, it handles HTTP over IO.

Subclass this to create a server for a specific language:

class Server < LSP::Server method "text/didChange", DidChangeRequest end

Direct Known Subclasses

Defined in:

lsp/server.cr

Constructors

Instance Method Summary

Macro Summary

Constructor Detail

def self.new(in __arg0 : IO, out __arg1 : IO) #

[View source]

Instance Method Detail

def log(message : String, type = 4) #

A method to send a log message notification


[View source]
def prepend_header(content : String) #

[View source]
def read #

Reads a message from the input IO, and converts to a Message object, calls execute on it and send the result if it's a request message.


[View source]
def send(content : String) #

[View source]
def send_request(id, method, params) #

[View source]
def send_response(id, result) #

[View source]
def show_message_request(message : String, type = 4) #

A method to send a show message request


[View source]

Macro Detail

macro method(name, message) #

[View source]