Skip to content

Support talon API for inserting and wrapping with snippets #1325

Closed
@pokey

Description

@pokey

Something like the following:

def insert_named_snippet(name: str, target: Optional[Target] = None):
    """Inserts a named snippet"""
    pass

def insert_custom_snippet(body: str, target: Optional[Target] = None, scope: Optional[str] = None):
    """Inserts a custom snippet"""
    # Note that we convert scope to a proper scopeType; technically it is a scopeTypeType
    pass

def wrap_with_named_snippet(name: str, variable_name: str, target: Target):
    """Wrap target with a named snippet"""
    pass

def wrap_with_custom_snippet(body: str, target: Target, scope: Optional[str] = None, variable_name: Optional[str] = None):
    """Wrap target with a custom snippet"""
    pass

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions