From f21d3502e1c4a8b8c712b0097c29098033af26ad Mon Sep 17 00:00:00 2001 From: Orion Yeung <11580988+orionyeung001@users.noreply.github.com> Date: Mon, 7 Aug 2023 15:37:13 -0500 Subject: [PATCH] Add `*.ron` syntax mapping Add a mapping to use `Rust` for rusty object notation, identified by `.ron` extension. See [#2427](https://github.com/sharkdp/bat/issues/2427). --- CHANGELOG.md | 1 + src/syntax_mapping.rs | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 51f27b91..e4d076a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ - Associate `Containerfile` with `Dockerfile` syntax, see #2606 (@einfachIrgendwer0815) - Replaced quotes with double quotes so fzf integration example script works on windows and linux. see #2095 (@johnmatthiggins) - Associate `ksh` files with `bash` syntax, see #2633 (@johnmatthiggins) +- Associate `ron` files with `rust` syntax, see #2427 (@YeungOnion) ## Themes diff --git a/src/syntax_mapping.rs b/src/syntax_mapping.rs index 55506fa4..e90a0305 100644 --- a/src/syntax_mapping.rs +++ b/src/syntax_mapping.rs @@ -156,6 +156,10 @@ impl<'a> SyntaxMapping<'a> { .insert("*.hook", MappingTarget::MapTo("INI")) .unwrap(); + mapping + .insert("*.ron", MappingTarget::MapTo("Rust")) + .unwrap(); + // Global git config files rooted in `$XDG_CONFIG_HOME/git/` or `$HOME/.config/git/` // See e.g. https://git-scm.com/docs/git-config#FILES if let Some(xdg_config_home) =