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
# imports = [./bufferline.nix];
imports = [
@ -44,13 +45,13 @@
autoCmd = [
{
event = ["BufEnter"];
pattern = ["*"];
event = [ "BufEnter" ];
pattern = [ "*" ];
command = "setlocal cursorline";
}
{
event = ["BufLeave"];
pattern = ["*"];
event = [ "BufLeave" ];
pattern = [ "*" ];
command = "setlocal nocursorline";
}
];

View file

@ -2,7 +2,9 @@
plugins.cmp = {
enable = true;
settings = {
completion = {keyword_length = 2;};
completion = {
keyword_length = 2;
};
mapping = {
"<C-n>" = "cmp.mapping.select_next_item()";
@ -22,12 +24,12 @@
'';
sources = [
{name = "nvim_lsp";}
{name = "buffer";}
{name = "cmdline";}
{name = "cmp-clippy";}
{name = "luasnip";}
{name = "path";}
{ name = "nvim_lsp"; }
{ name = "buffer"; }
{ name = "cmdline"; }
{ name = "cmp-clippy"; }
{ name = "luasnip"; }
{ name = "path"; }
];
};
};

View file

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

View file

@ -1,16 +1,17 @@
{pkgs, ...}: {
extraPlugins = with pkgs.vimPlugins; [rhubarb];
{ pkgs, ... }:
{
extraPlugins = with pkgs.vimPlugins; [ rhubarb ];
keymaps = [
{
action = "<cmd>GBrowse<CR>";
key = "<leader>bro";
mode = ["n"];
mode = [ "n" ];
}
{
action = ":GBrowse<CR>";
key = "<leader>bro";
mode = ["v"];
mode = [ "v" ];
}
];
}

View file

@ -11,8 +11,12 @@
};
settings.defaults.mappings = {
"i" = {
"<C-n>" = {__raw = "require('telescope.actions').cycle_history_next";};
"<C-p>" = {__raw = "require('telescope.actions').cycle_history_prev";};
"<C-n>" = {
__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 = [
(pkgs.vimUtils.buildVimPlugin {
name = "vim-obsession";

View file

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