feat: manual language selection #327

Merged
wetneb merged 16 commits from wetneb/mergiraf:manual-language-selection-v2 into main 2025-04-28 20:29:09 +02:00

16 commits

Author SHA1 Message Date
230050c63b Remove explicit TSX alternate name
All checks were successful
/ test (pull_request) Successful in 1m2s
2025-04-28 20:08:40 +02:00
d7e2290b5e Style fixes
All checks were successful
/ test (pull_request) Successful in 1m4s
2025-04-28 17:40:12 +02:00
538e243927 Also use find_by_filename_or_name in solve.rs
All checks were successful
/ test (pull_request) Successful in 58s
2025-04-27 09:32:48 +02:00
23604f7f9a Remove duplicate dot 2025-04-27 09:27:46 +02:00
34b9ab1bf9 Stylistic improvements 2025-04-27 09:27:26 +02:00
c010642734 Also consider extensions as language names
All checks were successful
/ test (pull_request) Successful in 1m8s
2025-04-22 14:52:10 +02:00
7d094b2623 feat: Add --language support to mgf_dev 2025-04-22 14:52:10 +02:00
240ee0fce1 refactor: introduce LangProfile::find_by_filename_or_name 2025-04-22 14:52:10 +02:00
719c61c6ad Also update the docs for adding a language 2025-04-22 14:52:10 +02:00
0e9cde7939 Add documentation 2025-04-22 14:52:08 +02:00
5453673559 Add tests 2025-04-22 14:51:26 +02:00
Ben Boeckel
b049246cf0 feat(lang_profile): support case-insensitive language matching 2025-04-22 14:51:26 +02:00
Ben Boeckel
8fc5213758 feat(lang_profile): support alternate names for languages
Some of the language names are a bit clunky, so offer alternative names
for manual selection to use.
2025-04-22 14:51:26 +02:00
Ben Boeckel
8099c90635 feat(mergiraf merge,solve): support language overrides
If the extension is not recognized or incorrect, allow the user to
override the language in use.

Fixes: #34
2025-04-22 14:51:26 +02:00
Ben Boeckel
609fd13d71 feat(lang_profile): support loading a language profile by name
If autodetection is not accurate, allow an override.
2025-04-22 14:51:26 +02:00
Ben Boeckel
2553cfb90e fix: explicitly declare that LangProfile is 'static
Lifetime elision otherwise ties the lifetime to the input `filename`
lifetime which is not true.
2025-04-22 14:51:26 +02:00