We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fn get_language_name<'a>(extension: &'a str) -> &'a str { match extension { "rs" => "Rust", "c" => "C", "cpp" | "cxx" | "c++" => "C++", "py" => "Python", "js" | "jsx" => "Javascript", "ts" => "Typescript", _ => { println!("Uknown file extension: {}", extension); "Uknown" }, // TODO: Add more } }
const KNOWN_EXTENSIONS_BINDINGS: &[(&str, &[&str])] = &[ ("rs", &["//", "/*", "*/"]), ("c", &["//", "/*", "*/"]), ("cpp", &["//", "/*", "*/"]),("c++", &["//", "/*", "*/"]),("cxx", &["//", "/*", "*/"]), ("py", &["#", "\"\"\"", "\"\"\""]), ("js", &["//", "/*", "*/"]),("jsx", &["//", "/*", "*/"]), ("ts", &["//", "/*", "*/"]), // TODO: Add more... ];
The upgrade of grouping this two things in just one is also allowed, and probably done in the future
The text was updated successfully, but these errors were encountered:
No branches or pull requests
To do this, two things in the code must be modified:
1. The Function that returns the language name given the extension
2. Edit the constant KNWON_EXTENSION_BINDINGS
The upgrade of grouping this two things in just one is also allowed, and probably done in the future
The text was updated successfully, but these errors were encountered: