different codebases use different formatters. autofmt looks for project configuration to pick the correct formatter, allowing an editor to simply point to the script and have all ambiguities resolved. this commit overhauls the conform configuration to set up autofmt correctly, as well installing it with 'pkgs.autofmt' closes #6
25 lines
505 B
Nix
25 lines
505 B
Nix
{ self, inputs }:
|
|
user: pkgs:
|
|
let
|
|
darwin = pkgs.lib.strings.hasSuffix "-darwin" pkgs.system;
|
|
|
|
host = {
|
|
inherit darwin;
|
|
linux = !darwin;
|
|
};
|
|
|
|
userDir = ../users + "/${user}";
|
|
userConfig = import (userDir + "/user.nix");
|
|
in
|
|
(inputs.nvf.lib.neovimConfiguration {
|
|
inherit pkgs;
|
|
modules = builtins.filter (f: f != null) [
|
|
(../users + ("/" + user + "/vim.nix"))
|
|
../modules/neovim
|
|
];
|
|
extraSpecialArgs = {
|
|
inherit host;
|
|
flake = self;
|
|
user = userConfig;
|
|
};
|
|
}).neovim
|