module

Xerp::Adapters

Constants

CODE_EXTENSIONS = Set {".cr", ".rb", ".rake", ".py", ".pyw", ".pyi", ".js", ".mjs", ".cjs", ".jsx", ".ts", ".tsx", ".mts", ".cts", ".go", ".rs", ".c", ".h", ".cc", ".cpp", ".cxx", ".hpp", ".hxx", ".java", ".kt", ".kts", ".scala", ".cs", ".fs", ".fsx", ".swift", ".m", ".mm", ".php", ".ex", ".exs", ".erl", ".hrl", ".hs", ".lhs", ".ml", ".mli", ".lua", ".pl", ".pm", ".sh", ".bash", ".zsh", ".fish", ".sql", ".zig", ".nim", ".v", ".d", ".jl", ".r", ".R", ".clj", ".cljs", ".cljc", ".edn"}

File extensions for code files (use indentation-based blocks).

CONFIG_EXTENSIONS = Set {".yml", ".yaml", ".toml", ".json", ".jsonc", ".xml", ".ini", ".cfg", ".conf", ".env", ".properties"}

File extensions for config files.

MARKDOWN_EXTENSIONS = Set {".md", ".markdown", ".mdown", ".mkd"}

File extensions for Markdown files.

Class methods

classify(rel_path : String, tab_width : Int32 = 4) : Adapter

Classifies a file and returns the appropriate adapter.

Source
file_type_for(rel_path : String) : String

Returns the file type string for a given path.

Source

Nested types