Class PineHoverProvider

Implements

  • HoverProvider

Constructors

Properties

document: TextDocument
isFunction: boolean = false
isMethod: boolean = false
isParam: boolean = false
isType: boolean = false
mapArrayMatrix: string = ''
position: Position

Methods

  • Creates a Markdown string for hover information using data from a PineDocsManager.

    Parameters

    • keyedDocs: PineDocsManager

      The PineDocsManager instance containing the documentation data.

    • key: string

      The key identifying the symbol for which to create the hover information.

    • namespace: undefined | string

      The namespace of the symbol, if any.

    • regexId: string

      The regular expression ID used to match the symbol in the documentation.

    Returns Promise<MarkdownString>

    A promise that resolves to a MarkdownString providing the hover information.

  • This function iterates through a list of hover functions and returns the first one that returns a truthy value.

    Parameters

    • Optional isTestPosition: any

      The position to test.

    Returns Promise<undefined | Hover>

    • A promise that resolves to a Hover object providing the hover information, or undefined if no hover information is available.
  • Determines whether the documentation matches a parameter, method, or function.

    Parameters

    • docs: PineDocsManager

      The PineDocsManager instance.

    • key: string

      The key identifying the symbol.

    • wordRange: Range

      The range of the word to match.

    Returns Promise<undefined | [undefined | PineDocsManager, undefined | string, undefined | string]>

    A promise that resolves to an array containing the matched documentation, key, and namespace.

  • Processes a range of words in the document.

    Parameters

    • docs: null | PineDocsManager

      The PineDocsManager instance.

    • hoverRegex: undefined | RegExp

      The regular expression hoverRegex to match.

    • regexId: string

      The regular expression ID.

    • transformKey: ((key) => string)

      The function to transform the key.

        • (key): string
        • Parameters

          • key: string

          Returns string

    Returns Promise<undefined | Hover>

    A promise that resolves to a vscode.Hover instance or undefined.

  • Parameters

    • document: TextDocument

      The active TextDocument in which the hover was invoked.

    • position: Position

      The Position at which the hover was invoked.

    • CancellationToken: CancellationToken

      A cancellation token.

    Returns Promise<undefined | Hover>

    • A promise that resolves to a Hover object providing the hover information, or undefined if no hover information is available.
  • This function produces an array of hover functions.

    Parameters

    • num: number = 0

      The number of the hover function to provide.

    Returns undefined | Promise<undefined | Hover>

Generated using TypeDoc