class Mint::LS::Definition

Overview

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

Defined in:

ls/definition.cr
ls/definition/connect.cr
ls/definition/connect_variable.cr
ls/definition/enum_destructuring.cr
ls/definition/enum_id.cr
ls/definition/html_attribute.cr
ls/definition/html_component.cr
ls/definition/html_element.cr
ls/definition/html_style.cr
ls/definition/type.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=

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::Connect, server : Server, workspace : Workspace, stack : Array(Ast::Node)) #

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

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

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

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

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

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

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

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

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

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

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

[View source]
def has_link_support?(server : Server) #

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

Returns a LSP::LocationLink that links from source to the target node if the language server client has link support, otherwise it returns LSP::Location.

When returning a LSP::LocationLink, parent 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_range(location : Ast::Node::Location) : LSP::Range #

[View source]