class Mint::LS::Definition
- Mint::LS::Definition
 - LSP::RequestMessage
 - Reference
 - Object
 
Overview
This is the class that handles the "textDocument/definition" request.
Defined in:
ls/definition.crls/definition/access.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/module_access.cr
ls/definition/type.cr
ls/definition/type_id.cr
ls/definition/variable.cr
Constructors
- 
        .new(pull : JSON::PullParser)
        
          
This is the class that handles the "textDocument/definition" request.
 
Instance Method Summary
- #cursor_intersects?(node : Ast::Node, position : LSP::Position) : Bool
 - #cursor_intersects?(node : Ast::Node, params : LSP::TextDocumentPositionParams) : Bool
 - #cursor_intersects?(node : Ast::Node) : Bool
 - #definition(node : Ast::Access, workspace : Workspace, stack : Array(Ast::Node))
 - #definition(node : Ast::Connect, workspace : Workspace, stack : Array(Ast::Node))
 - #definition(node : Ast::ConnectVariable, workspace : Workspace, stack : Array(Ast::Node))
 - #definition(node : Ast::EnumDestructuring, workspace : Workspace, stack : Array(Ast::Node))
 - #definition(node : Ast::EnumId, workspace : Workspace, stack : Array(Ast::Node))
 - #definition(node : Ast::HtmlAttribute, workspace : Workspace, stack : Array(Ast::Node))
 - #definition(node : Ast::HtmlComponent, workspace : Workspace, stack : Array(Ast::Node))
 - #definition(node : Ast::HtmlElement, workspace : Workspace, stack : Array(Ast::Node))
 - #definition(node : Ast::HtmlStyle, workspace : Workspace, stack : Array(Ast::Node))
 - #definition(node : Ast::ModuleAccess, workspace : Workspace, stack : Array(Ast::Node))
 - #definition(node : Ast::Type, workspace : Workspace, stack : Array(Ast::Node))
 - #definition(node : Ast::TypeId, workspace : Workspace, stack : Array(Ast::Node))
 - #definition(node : Ast::Variable, workspace : Workspace, stack : Array(Ast::Node))
 - #definition(node : Ast::Node, workspace : Workspace, stack : Array(Ast::Node))
 - #execute(server) : Array(LSP::LocationLink) | Array(LSP::Location) | LSP::Location | Nil
 - #find_component(workspace : Workspace, name : String) : Ast::Component | Nil
 - 
        #location_link(source : Ast::Node, target : Ast::Node, parent : Ast::Node) : LSP::LocationLink
        
          
Returns a
LSP::LocationLinkthat links from source to the target node - #params : LSP::TextDocumentPositionParams
 - #params=(params : LSP::TextDocumentPositionParams)
 - #to_lsp_location(location_link : LSP::LocationLink) : LSP::Location
 - #to_lsp_range(location : Ast::Node::Location) : LSP::Range
 - #variable_connect(node : Ast::Variable, parents : Array(TypeChecker::Scope::Node))
 - #variable_lookup(node : Ast::Variable, target : Ast::Node | TypeChecker::Checkable)
 - #variable_lookup_parent(node : Ast::Variable, target : TypeChecker::Scope::Node, workspace : Workspace)
 - #variable_next_key(node : Ast::Variable, workspace : Workspace, stack : Array(Ast::Node))
 - #variable_record_key(node : Ast::Variable, workspace : Workspace, stack : Array(Ast::Node))
 
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.
Instance Method Detail
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
        
        def variable_lookup_parent(node : Ast::Variable, target : TypeChecker::Scope::Node, workspace : Workspace)
        #