Skip to content

Commit

Permalink
Add *.ron syntax mapping
Browse files Browse the repository at this point in the history
Add a mapping to use `Rust` for rusty object notation, identified by `.ron` extension. See [sharkdp#2427](sharkdp#2427).
  • Loading branch information
YeungOnion committed Aug 7, 2023
1 parent 6dd8b28 commit fbd8049
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
- Associate `os-release` with `bash` syntax, see #2587 (@cyqsimon)
- Associate `Containerfile` with `Dockerfile` syntax, see #2606 (@einfachIrgendwer0815)
- Associate `ksh` files with `bash` syntax, see #2633 (@johnmatthiggins)
- Associate `ron` files with `rust` syntax, see #2427 (@YeungOnion)

## Themes

Expand Down
4 changes: 4 additions & 0 deletions src/syntax_mapping.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,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) =
Expand Down

0 comments on commit fbd8049

Please sign in to comment.