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]]
|
||||
name = "nix"
|
||||
formatter = { command = "treefmt", args = ["--stdin", "$FILE"] }
|
||||
formatter = { command = "treefmt", args = ["--stdin", ".nix", "--quiet"] }
|
||||
auto-format = true
|
||||
|
||||
[[language]]
|
||||
name = "toml"
|
||||
formatter = { command = "treefmt", args = ["--stdin"] }
|
||||
formatter = { command = "treefmt", args = ["--stdin", ".nix", "--quiet"] }
|
||||
auto-format = true
|
||||
|
||||
[[language]]
|
||||
name = "yaml"
|
||||
formatter = { command = "treefmt", args = ["--stdin"] }
|
||||
# formatter = { command = 'prettier', args = ["--parser", "yaml"] }
|
||||
formatter = { command = "treefmt", args = ["--stdin", ".nix", "--quiet"] }
|
||||
auto-format = true
|
||||
|
||||
[[language]]
|
||||
name = "markdown"
|
||||
formatter = { command = "treefmt", args = ["--stdin"] }
|
||||
# formatter = { command = 'prettier', args = ["--parser", "markdown"] }
|
||||
formatter = { command = "treefmt", args = ["--stdin", ".nix", "--quiet"] }
|
||||
auto-format = true
|
||||
|
|
30
flake.nix
30
flake.nix
|
@ -2,20 +2,20 @@
|
|||
{
|
||||
description = "My Home Manager configuration";
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/master";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nur.url = "github:nix-community/NUR";
|
||||
nixgl = {
|
||||
url = "github:nix-community/nixGL";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
lix-module = {
|
||||
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.93.1.tar.gz";
|
||||
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 = {
|
||||
url = "github:Mic92/sops-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
@ -26,11 +26,11 @@
|
|||
outputs =
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
nur,
|
||||
nixgl,
|
||||
lix-module,
|
||||
nixgl,
|
||||
nixpkgs,
|
||||
nur,
|
||||
sops-nix,
|
||||
treefmt-nix,
|
||||
...
|
||||
|
@ -67,16 +67,14 @@
|
|||
devShells.${system}.default = pkgs.mkShell {
|
||||
buildInputs = [
|
||||
pkgs.age
|
||||
pkgs.sops
|
||||
pkgs.just
|
||||
pkgs.forgejo-cli
|
||||
pkgs.nil
|
||||
# pkgs.nixfmt-rfc-style
|
||||
pkgs.taplo
|
||||
pkgs.marksman
|
||||
pkgs.helix
|
||||
pkgs.just
|
||||
pkgs.marksman
|
||||
pkgs.nil
|
||||
pkgs.sops
|
||||
pkgs.taplo
|
||||
pkgs.uutils-coreutils
|
||||
pkgs.prettier
|
||||
pkgs.yaml-language-server
|
||||
treefmtEval.config.build.wrapper
|
||||
];
|
||||
|
|
4
home.nix
4
home.nix
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
pkgs,
|
||||
nixgl,
|
||||
config,
|
||||
nixgl,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
enable = true;
|
||||
strict = true;
|
||||
};
|
||||
taplo = {
|
||||
prettier = {
|
||||
enable = true;
|
||||
};
|
||||
prettier = {
|
||||
taplo = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue