Skip to content

Commit

Permalink
Prefer 'device tree' as two words
Browse files Browse the repository at this point in the history
  • Loading branch information
Wilfred committed May 13, 2024
1 parent de9c84c commit d292546
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

### Parsing

Added support for devicetree.
Added support for device tree.

Difftastic now uses tree-sitter comment highlighing as a hint that
nodes should be treated as atoms. This ensures comments are treated
Expand Down
2 changes: 1 addition & 1 deletion manual/src/languages_supported.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ with `difft --list-languages`.
| CMake | [uyha/tree-sitter-cmake](https://github.com/uyha/tree-sitter-cmake) |
| Common Lisp | [theHamsta/tree-sitter-commonlisp](https://github.com/theHamsta/tree-sitter-commonlisp) |
| Dart | [UserNobody14/tree-sitter-dart](https://github.com/UserNobody14/tree-sitter-dart) |
| Devicetree | [joelspadin/tree-sitter-devicetree](https://github.com/joelspadin/tree-sitter-devicetree) |
| Device Tree | [joelspadin/tree-sitter-devicetree](https://github.com/joelspadin/tree-sitter-devicetree) |
| Elixir | [elixir-lang/tree-sitter-elixir](https://github.com/elixir-lang/tree-sitter-elixir) |
| Elm | [elm-tooling/tree-sitter-elm](https://github.com/elm-tooling/tree-sitter-elm) |
| Elvish | [ckafi/tree-sitter-elvish](https://github.com/ckafi/tree-sitter-elvish) |
Expand Down
2 changes: 1 addition & 1 deletion sample_files/compare.expected
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ sample_files/dart_1.dart sample_files/dart_2.dart
631b39f8574990923d4ac3d541e2966d -

sample_files/devicetree_1.dts sample_files/devicetree_2.dts
315a2c9f53f5c82e80635b357511e45b -
77f13f1cff53b996778d142a94fe58f6 -

sample_files/elisp_1.el sample_files/elisp_2.el
e44eda0da58fe6eb3fba9ce3244044ad -
Expand Down
6 changes: 3 additions & 3 deletions src/parse/guess_language.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub(crate) enum Language {
CSharp,
Css,
Dart,
Devicetree,
DeviceTree,
Elixir,
Elm,
Elvish,
Expand Down Expand Up @@ -121,7 +121,7 @@ pub(crate) fn language_name(language: Language) -> &'static str {
CSharp => "C#",
Css => "CSS",
Dart => "Dart",
Devicetree => "Devicetree",
DeviceTree => "Device Tree",
Elixir => "Elixir",
Elm => "Elm",
Elvish => "Elvish",
Expand Down Expand Up @@ -247,7 +247,7 @@ pub(crate) fn language_globs(language: Language) -> Vec<glob::Pattern> {
CSharp => &["*.cs"],
Css => &["*.css"],
Dart => &["*.dart"],
Devicetree => &["*.dts", "*.dtsi", "*.dtso", "*.its"],
DeviceTree => &["*.dts", "*.dtsi", "*.dtso", "*.its"],
Elm => &["*.elm"],
EmacsLisp => &["*.el", ".emacs", "_emacs", "Cask"],
Elixir => &["*.ex", "*.exs"],
Expand Down
2 changes: 1 addition & 1 deletion src/parse/tree_sitter_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ pub(crate) fn from_language(language: guess::Language) -> TreeSitterConfig {
sub_languages: vec![],
}
}
Devicetree => {
DeviceTree => {
let language = unsafe { tree_sitter_devicetree() };
TreeSitterConfig {
language,
Expand Down

0 comments on commit d292546

Please sign in to comment.