Function getLanguage

  • Retrieves the language data associated with a given filename.

    This function first attempts to match the filename directly against known filenames in the language data. If no match is found, it falls back to matching by file extension, trying longer extensions before shorter ones.

    Parameters

    • filePath: string

    Returns LanguageWithIconsData | undefined

    The LanguageWithIconsData object if a match is found, undefined otherwise.