class Crystalline::Workspace

Defined in:

crystalline/workspace.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(server : LSP::Server, root_uri : String | Nil) #

[View source]

Class Method Detail

def self.compilation_lock #

Allow one compilation at a time.


[View source]

Instance Method Detail

def close_document(server : LSP::Server, params : LSP::DidCloseTextDocumentParams) #

[View source]
def compile(server : LSP::Server, file_uri : URI, *, in_memory = false, ignore_diagnostics = server.client_capabilities.ignore_diagnostics?, ignore_cached_result = false, do_not_cache_result = false, wants_doc = false, text_overrides = nil, fail_fast = false, top_level = false, discard_nil_cached_result = false) #

Use the crystal compiler to typecheck the program.


[View source]
def completion(server : LSP::Server, file_uri : URI, position : LSP::Position, trigger_character : String | Nil) #

[View source]
def definitions(server : LSP::Server, file_uri : URI, position : LSP::Position) #

[View source]
def document_symbols(server : LSP::Server, file_uri : URI) #

[View source]
def format_document(params : LSP::DocumentFormattingParams) : Tuple(String, TextDocument) | Nil #

[View source]
def format_document(params : LSP::DocumentRangeFormattingParams) : Tuple(String, TextDocument) | Nil #

[View source]
def hover(server : LSP::Server, file_uri : URI, position : LSP::Position) #

[View source]
def open_document(params : LSP::DidOpenTextDocumentParams) #

[View source]
def opened_documents : Hash(String, Crystalline::TextDocument) #

A list of documents that are openened in the text editor.


[View source]
def projects : Array(Crystalline::Project) #

A list of projects in this workspace


[View source]
def recalculate_dependencies(server, project) #

Run a top level semantic analysis to compute dependencies.


[View source]
def root_uri : URI | Nil #

The workspace filesystem uri.


[View source]
def save_document(server : LSP::Server, params : LSP::DidSaveTextDocumentParams) #

[View source]
def update_document(server : LSP::Server, params : LSP::DidChangeTextDocumentParams) #

[View source]