Skip to content
New issue

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

Add *.ron syntax mapping #2642

Merged
merged 2 commits into from
Sep 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@

- Associate `os-release` with `bash` syntax, see #2587 (@cyqsimon)
- 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

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ use `bat`s `--color=always` option to force colorized output. You can also use `
option to restrict the load times for long files:

```bash
fzf --preview 'bat --color=always --style=numbers --line-range=:500 {}'
fzf --preview "bat --color=always --style=numbers --line-range=:500 {}"
```

For more information, see [`fzf`'s `README`](https://github.com/junegunn/fzf#preview-window).
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