Skip to content

Commit

Permalink
chore: format code with treefmt
Browse files Browse the repository at this point in the history
  • Loading branch information
aldoborrero committed Oct 19, 2024
1 parent 1e1adb2 commit b9b17e7
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 18 deletions.
22 changes: 9 additions & 13 deletions devshell.nix
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
{pkgs, ...}:
pkgs.mkShell {
packages = [
pkgs.nodejs
pkgs.python3
packages = with pkgs; [
nodejs
python3

pkgs.tree-sitter
pkgs.editorconfig-checker
tree-sitter
editorconfig-checker

pkgs.rustc
pkgs.cargo
rustc
cargo

# Formatters
pkgs.treefmt
pkgs.nixpkgs-fmt
pkgs.nodePackages.prettier
pkgs.rustfmt
pkgs.clang-tools
go
gcc
];
}
6 changes: 3 additions & 3 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ module.exports = grammar({
prec(
precedence,
seq(field("operator", operator), field("argument", $._expr_op)),
),
)
),
),

Expand Down Expand Up @@ -234,7 +234,7 @@ module.exports = grammar({
field("operator", operator),
field("right", $._expr_op),
),
),
)
),
// right assoc.
...[
Expand All @@ -249,7 +249,7 @@ module.exports = grammar({
field("operator", operator),
field("right", $._expr_op),
),
),
)
),
),

Expand Down
8 changes: 6 additions & 2 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:recommended"],
"extends": [
"config:recommended"
],
"lockFileMaintenance": {
"enabled": true,
"extends": ["schedule:weekly"]
"extends": [
"schedule:weekly"
]
},
"nix": {
"enabled": true
Expand Down
5 changes: 5 additions & 0 deletions treefmt.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
deadnix.enable = true;
statix.enable = true;

# swift
swift-format.enable = true;

# rust
rustfmt = {
enable = true;
Expand All @@ -36,6 +39,8 @@
excludes = [
"bindings/node/binding.cc"
"src/parser.c"
"src/tree_sitter/alloc.h"
"src/tree_sitter/array.h"
"src/tree_sitter/parser.h"
];
};
Expand Down

0 comments on commit b9b17e7

Please sign in to comment.