Languages supported by difftastic. Each language here has a corresponding tree-sitter parser.
Try to guess the language based on an Emacs mode comment at the beginning of the file.
Try to guess the language based on a shebang present in the source.
File globs that identify languages based on the file path.
The language name shown to the user.
If there is a language called
name (comparing case
insensitively), return it. Treat
"text" as an additional option.
Use a heuristic to determine if a ‘.h’ file looks like Objective-C. We look for a line starting with ‘#import’, ‘@interface’ or ‘@protocol’ near the top of the file. These keywords are not valid C or C++, so this should not produce false positives.