Switched from alejandra to nixfmt(-rfc-style)

Also re-formatted nix files
This commit is contained in:
alejandro-angulo 2024-12-27 23:39:34 -08:00
parent ea90b0356f
commit ddb857e6ac
Signed by: alejandro-angulo
GPG key ID: 75579581C74554B6
7 changed files with 66 additions and 52 deletions

View file

@ -1,4 +1,5 @@
{...}: { { ... }:
{
# Import all your configuration modules here # Import all your configuration modules here
# imports = [./bufferline.nix]; # imports = [./bufferline.nix];
imports = [ imports = [

View file

@ -2,7 +2,9 @@
plugins.cmp = { plugins.cmp = {
enable = true; enable = true;
settings = { settings = {
completion = {keyword_length = 2;}; completion = {
keyword_length = 2;
};
mapping = { mapping = {
"<C-n>" = "cmp.mapping.select_next_item()"; "<C-n>" = "cmp.mapping.select_next_item()";

View file

@ -1,4 +1,5 @@
{pkgs, ...}: { { pkgs, ... }:
{
plugins.lsp = { plugins.lsp = {
enable = true; enable = true;
@ -74,7 +75,7 @@
# nix # nix
nixd = { nixd = {
enable = true; enable = true;
settings.formatting.command = ["${pkgs.alejandra}/bin/alejandra"]; settings.formatting.command = [ "${pkgs.nixfmt-rfc-style}/bin/nixfmt" ];
}; };
}; };
}; };

View file

@ -1,4 +1,5 @@
{pkgs, ...}: { { pkgs, ... }:
{
extraPlugins = with pkgs.vimPlugins; [ rhubarb ]; extraPlugins = with pkgs.vimPlugins; [ rhubarb ];
keymaps = [ keymaps = [

View file

@ -11,8 +11,12 @@
}; };
settings.defaults.mappings = { settings.defaults.mappings = {
"i" = { "i" = {
"<C-n>" = {__raw = "require('telescope.actions').cycle_history_next";}; "<C-n>" = {
"<C-p>" = {__raw = "require('telescope.actions').cycle_history_prev";}; __raw = "require('telescope.actions').cycle_history_next";
};
"<C-p>" = {
__raw = "require('telescope.actions').cycle_history_prev";
};
}; };
}; };
}; };

View file

@ -1,4 +1,5 @@
{pkgs, ...}: { { pkgs, ... }:
{
extraPlugins = [ extraPlugins = [
(pkgs.vimUtils.buildVimPlugin { (pkgs.vimUtils.buildVimPlugin {
name = "vim-obsession"; name = "vim-obsession";

View file

@ -7,7 +7,8 @@
flake-parts.url = "github:hercules-ci/flake-parts"; flake-parts.url = "github:hercules-ci/flake-parts";
}; };
outputs = { outputs =
{
nixvim, nixvim,
flake-parts, flake-parts,
... ...
@ -20,11 +21,13 @@
"aarch64-darwin" "aarch64-darwin"
]; ];
perSystem = { perSystem =
{
pkgs, pkgs,
system, system,
... ...
}: let }:
let
nixvimLib = nixvim.lib.${system}; nixvimLib = nixvim.lib.${system};
nixvim' = nixvim.legacyPackages.${system}; nixvim' = nixvim.legacyPackages.${system};
nixvimModule = { nixvimModule = {
@ -36,7 +39,8 @@
}; };
}; };
nvim = nixvim'.makeNixvimWithModule nixvimModule; nvim = nixvim'.makeNixvimWithModule nixvimModule;
in { in
{
checks = { checks = {
# Run `nix flake check .` to verify that your config is not broken # Run `nix flake check .` to verify that your config is not broken
default = nixvimLib.check.mkTestDerivationFromNixvimModule nixvimModule; default = nixvimLib.check.mkTestDerivationFromNixvimModule nixvimModule;