Fix Helix integration with treefmt
This commit is contained in:
parent
3785955a2c
commit
98dfde251a
4 changed files with 24 additions and 26 deletions
|
@ -1,21 +1,21 @@
|
||||||
|
# TODO: switch to "%{buffer_name}" when this feature makes it to Helix release
|
||||||
|
|
||||||
[[language]]
|
[[language]]
|
||||||
name = "nix"
|
name = "nix"
|
||||||
formatter = { command = "treefmt", args = ["--stdin", "$FILE"] }
|
formatter = { command = "treefmt", args = ["--stdin", ".nix", "--quiet"] }
|
||||||
auto-format = true
|
auto-format = true
|
||||||
|
|
||||||
[[language]]
|
[[language]]
|
||||||
name = "toml"
|
name = "toml"
|
||||||
formatter = { command = "treefmt", args = ["--stdin"] }
|
formatter = { command = "treefmt", args = ["--stdin", ".nix", "--quiet"] }
|
||||||
auto-format = true
|
auto-format = true
|
||||||
|
|
||||||
[[language]]
|
[[language]]
|
||||||
name = "yaml"
|
name = "yaml"
|
||||||
formatter = { command = "treefmt", args = ["--stdin"] }
|
formatter = { command = "treefmt", args = ["--stdin", ".nix", "--quiet"] }
|
||||||
# formatter = { command = 'prettier', args = ["--parser", "yaml"] }
|
|
||||||
auto-format = true
|
auto-format = true
|
||||||
|
|
||||||
[[language]]
|
[[language]]
|
||||||
name = "markdown"
|
name = "markdown"
|
||||||
formatter = { command = "treefmt", args = ["--stdin"] }
|
formatter = { command = "treefmt", args = ["--stdin", ".nix", "--quiet"] }
|
||||||
# formatter = { command = 'prettier', args = ["--parser", "markdown"] }
|
|
||||||
auto-format = true
|
auto-format = true
|
||||||
|
|
30
flake.nix
30
flake.nix
|
@ -2,20 +2,20 @@
|
||||||
{
|
{
|
||||||
description = "My Home Manager configuration";
|
description = "My Home Manager configuration";
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager/master";
|
url = "github:nix-community/home-manager/master";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
nur.url = "github:nix-community/NUR";
|
|
||||||
nixgl = {
|
|
||||||
url = "github:nix-community/nixGL";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
lix-module = {
|
lix-module = {
|
||||||
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.93.1.tar.gz";
|
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.93.1.tar.gz";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
nixgl = {
|
||||||
|
url = "github:nix-community/nixGL";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||||
|
nur.url = "github:nix-community/NUR";
|
||||||
sops-nix = {
|
sops-nix = {
|
||||||
url = "github:Mic92/sops-nix";
|
url = "github:Mic92/sops-nix";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
@ -26,11 +26,11 @@
|
||||||
outputs =
|
outputs =
|
||||||
{
|
{
|
||||||
self,
|
self,
|
||||||
nixpkgs,
|
|
||||||
home-manager,
|
home-manager,
|
||||||
nur,
|
|
||||||
nixgl,
|
|
||||||
lix-module,
|
lix-module,
|
||||||
|
nixgl,
|
||||||
|
nixpkgs,
|
||||||
|
nur,
|
||||||
sops-nix,
|
sops-nix,
|
||||||
treefmt-nix,
|
treefmt-nix,
|
||||||
...
|
...
|
||||||
|
@ -67,16 +67,14 @@
|
||||||
devShells.${system}.default = pkgs.mkShell {
|
devShells.${system}.default = pkgs.mkShell {
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
pkgs.age
|
pkgs.age
|
||||||
pkgs.sops
|
|
||||||
pkgs.just
|
|
||||||
pkgs.forgejo-cli
|
pkgs.forgejo-cli
|
||||||
pkgs.nil
|
|
||||||
# pkgs.nixfmt-rfc-style
|
|
||||||
pkgs.taplo
|
|
||||||
pkgs.marksman
|
|
||||||
pkgs.helix
|
pkgs.helix
|
||||||
|
pkgs.just
|
||||||
|
pkgs.marksman
|
||||||
|
pkgs.nil
|
||||||
|
pkgs.sops
|
||||||
|
pkgs.taplo
|
||||||
pkgs.uutils-coreutils
|
pkgs.uutils-coreutils
|
||||||
pkgs.prettier
|
|
||||||
pkgs.yaml-language-server
|
pkgs.yaml-language-server
|
||||||
treefmtEval.config.build.wrapper
|
treefmtEval.config.build.wrapper
|
||||||
];
|
];
|
||||||
|
|
4
home.nix
4
home.nix
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
pkgs,
|
|
||||||
nixgl,
|
|
||||||
config,
|
config,
|
||||||
|
nixgl,
|
||||||
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
|
|
@ -6,10 +6,10 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
strict = true;
|
strict = true;
|
||||||
};
|
};
|
||||||
taplo = {
|
prettier = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
prettier = {
|
taplo = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue