Add additional programming language specifiers

This commit is contained in:
Yiorgis Gozadinos 2025-12-19 11:09:57 +02:00
parent 1dbbaf6dd8
commit fb1d3c97b3
No known key found for this signature in database

View file

@ -18,57 +18,129 @@ class TextFileHandler:
# Plain text extensions that we'll read directly # Plain text extensions that we'll read directly
text_extensions: ClassVar[list[str]] = [ text_extensions: ClassVar[list[str]] = [
".astro", ".astro",
".bash",
".c", ".c",
".clj",
".cljs",
".cpp", ".cpp",
".cs",
".css", ".css",
".dart",
".elm",
".ex",
".exs",
".fs",
".fsx",
".go", ".go",
".gql",
".graphql",
".groovy",
".h", ".h",
".hcl",
".hpp", ".hpp",
".hs",
".java", ".java",
".jl",
".js", ".js",
".json", ".json",
".kt", ".kt",
".less",
".lua",
".mdx", ".mdx",
".mjs", ".mjs",
".ml",
".mli",
".nim",
".nix",
".php", ".php",
".pl",
".pm",
".proto",
".ps1",
".py", ".py",
".r",
".rb", ".rb",
".rs", ".rs",
".sass",
".scala",
".scss",
".sh",
".sql",
".svelte", ".svelte",
".swift", ".swift",
".tf",
".toml",
".ts", ".ts",
".tsx", ".tsx",
".txt", ".txt",
".vue", ".vue",
".xml",
".yaml", ".yaml",
".yml", ".yml",
".zig",
] ]
# Code file extensions with their markdown language identifiers # Code file extensions with their markdown language identifiers
code_markdown_identifier: ClassVar[dict[str, str]] = { code_markdown_identifier: ClassVar[dict[str, str]] = {
".astro": "astro", ".astro": "astro",
".bash": "bash",
".c": "c", ".c": "c",
".clj": "clojure",
".cljs": "clojure",
".cpp": "cpp", ".cpp": "cpp",
".cs": "csharp",
".css": "css", ".css": "css",
".dart": "dart",
".elm": "elm",
".ex": "elixir",
".exs": "elixir",
".fs": "fsharp",
".fsx": "fsharp",
".go": "go", ".go": "go",
".gql": "graphql",
".graphql": "graphql",
".groovy": "groovy",
".h": "c", ".h": "c",
".hcl": "hcl",
".hpp": "cpp", ".hpp": "cpp",
".hs": "haskell",
".java": "java", ".java": "java",
".jl": "julia",
".js": "javascript", ".js": "javascript",
".json": "json", ".json": "json",
".kt": "kotlin", ".kt": "kotlin",
".less": "less",
".lua": "lua",
".mjs": "javascript", ".mjs": "javascript",
".ml": "ocaml",
".mli": "ocaml",
".nim": "nim",
".nix": "nix",
".php": "php", ".php": "php",
".pl": "perl",
".pm": "perl",
".proto": "protobuf",
".ps1": "powershell",
".py": "python", ".py": "python",
".r": "r",
".rb": "ruby", ".rb": "ruby",
".rs": "rust", ".rs": "rust",
".sass": "sass",
".scala": "scala",
".scss": "scss",
".sh": "bash",
".sql": "sql",
".svelte": "svelte", ".svelte": "svelte",
".swift": "swift", ".swift": "swift",
".tf": "hcl",
".toml": "toml",
".ts": "typescript", ".ts": "typescript",
".tsx": "tsx", ".tsx": "tsx",
".vue": "vue", ".vue": "vue",
".xml": "xml",
".yaml": "yaml", ".yaml": "yaml",
".yml": "yaml", ".yml": "yaml",
".zig": "zig",
} }
@staticmethod @staticmethod