class Mint::LS::Definitions

Defined in:

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

Constructors

Instance Method Summary

Constructor Detail

def self.new(*, params : LSP::TextDocumentPositionParams, type_checker : TypeChecker, stack : Array(Ast::Node)) #

[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) #

[View source]
def definition(node : Ast::Connect) #

[View source]
def definition(node : Ast::ConnectVariable) #

[View source]
def definition(node : Ast::HtmlAttribute) #

[View source]
def definition(node : Ast::HtmlComponent) #

[View source]
def definition(node : Ast::HtmlElement) #

[View source]
def definition(node : Ast::HtmlStyle) #

[View source]
def definition(node : Ast::Id) #

[View source]
def definition(node : Ast::Type) #

[View source]
def definition(node : Ast::TypeDestructuring) #

[View source]
def definition(node : Ast::Variable) #

[View source]
def definition(node : Ast::Node) #

[View source]
def find_component(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]
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) #

[View source]
def variable_next_key(node : Ast::Variable) #

[View source]
def variable_record_key(node : Ast::Variable) #

[View source]