class Mint::LS::Definition

Overview

This is the class that handles the "textDocument/definition" request.

Defined in:

ls/definition.cr
ls/definition/access.cr
ls/definition/connect.cr
ls/definition/connect_variable.cr
ls/definition/html_attribute.cr
ls/definition/html_component.cr
ls/definition/html_element.cr
ls/definition/html_style.cr
ls/definition/id.cr
ls/definition/type.cr
ls/definition/type_destructuring.cr
ls/definition/variable.cr

Constructors

Instance Method Summary

Instance methods inherited from class LSP::RequestMessage

execute(server : Server) execute, id : Int32 | String id, id=(id : Int32 | String) id=, method : String method, method=(method : String) method=, snippet_support : Bool | Nil snippet_support, snippet_support=(snippet_support : Bool | Nil) snippet_support=

Constructor methods inherited from class LSP::RequestMessage

new(pull : JSON::PullParser) new

Constructor Detail

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

This is the class that handles the "textDocument/definition" request.


[View source]

Instance Method Detail

def cursor_intersects?(node : Ast::Node, position : LSP::Position) : Bool #

[View source]
def cursor_intersects?(node : Ast::Node, params : LSP::TextDocumentPositionParams) : Bool #

[View source]
def cursor_intersects?(node : Ast::Node) : Bool #

[View source]
def definition(node : Ast::Access, server : Server, workspace : Workspace, stack : Array(Ast::Node)) #

[View source]
def definition(node : Ast::TypeDestructuring, server : Server, workspace : Workspace, stack : Array(Ast::Node)) #

[View source]
def definition(node : Ast::Connect, workspace : Workspace, stack : Array(Ast::Node)) #

[View source]
def definition(node : Ast::ConnectVariable, workspace : Workspace, stack : Array(Ast::Node)) #

[View source]
def definition(node : Ast::HtmlAttribute, workspace : Workspace, stack : Array(Ast::Node)) #

[View source]
def definition(node : Ast::HtmlComponent, workspace : Workspace, stack : Array(Ast::Node)) #

[View source]
def definition(node : Ast::HtmlElement, workspace : Workspace, stack : Array(Ast::Node)) #

[View source]
def definition(node : Ast::HtmlStyle, workspace : Workspace, stack : Array(Ast::Node)) #

[View source]
def definition(node : Ast::Id, workspace : Workspace, stack : Array(Ast::Node)) #

[View source]
def definition(node : Ast::Type, workspace : Workspace, stack : Array(Ast::Node)) #

[View source]
def definition(node : Ast::Variable, workspace : Workspace, stack : Array(Ast::Node)) #

[View source]
def definition(node : Ast::Node, workspace : Workspace, stack : Array(Ast::Node)) #

[View source]
def execute(server) : Array(LSP::LocationLink) | Array(LSP::Location) | LSP::Location | Nil #

[View source]
def find_component(workspace : Workspace, name : String) : Ast::Component | Nil #

[View source]
def location_link(source : Ast::Node, target : Ast::Node, parent : Ast::Node) : LSP::LocationLink #

Returns a LSP::LocationLink that links from source to the target node

The parent node is used to provide the full range for the target node. For example, for a function, target would be the function name, and parent would be the whole node, including function body and any comments


[View source]

[View source]
def params=(params : LSP::TextDocumentPositionParams) #

[View source]
def to_lsp_location(location_link : LSP::LocationLink) : LSP::Location #

[View source]
def to_lsp_range(location : Ast::Node::Location) : LSP::Range #

[View source]
def variable_lookup(node : Ast::Variable, target : Ast::Node | TypeChecker::Checkable) #

[View source]
def variable_lookup_parent(node : Ast::Variable, variable : Ast::Variable, workspace : Workspace) #

[View source]
def variable_next_key(node : Ast::Variable, workspace : Workspace, stack : Array(Ast::Node)) #

[View source]
def variable_record_key(node : Ast::Variable, workspace : Workspace, stack : Array(Ast::Node)) #

[View source]