Reformatted to alejandra style

This commit is contained in:
Fred Drake
2024-10-03 21:33:17 -04:00
parent ced6c4d36e
commit 53e75b11ce
11 changed files with 405 additions and 382 deletions
+3 -6
View File
@@ -70,8 +70,7 @@
{
type = "button";
val = " Find File ";
on_press.__raw =
"function() require('telescope.builtin').find_files() end";
on_press.__raw = "function() require('telescope.builtin').find_files() end";
opts = {
shortcut = "f";
keymap = [
@@ -97,8 +96,7 @@
{
type = "button";
val = " Recent Files ";
on_press.__raw =
"function() require('telescope.builtin').oldfiles() end";
on_press.__raw = "function() require('telescope.builtin').oldfiles() end";
opts = {
shortcut = "r";
keymap = [
@@ -124,8 +122,7 @@
{
type = "button";
val = " Find Text ";
on_press.__raw =
"function() require('telescope.builtin').live_grep() end";
on_press.__raw = "function() require('telescope.builtin').live_grep() end";
opts = {
shortcut = "g";
keymap = [
+2 -4
View File
@@ -31,8 +31,7 @@
{
mode = "n";
key = "<leader>dB";
action =
"\n <cmd>lua require('dap').set_breakpoint(vim.fn.input('Breakpoint condition: '))<cr>\n ";
action = "\n <cmd>lua require('dap').set_breakpoint(vim.fn.input('Breakpoint condition: '))<cr>\n ";
options = {
silent = true;
desc = "Breakpoint Condition";
@@ -203,8 +202,7 @@
{
mode = "n";
key = "<leader>df";
action =
"<CMD>lua require('dap.ext.vscode').load_launchjs()<CR><CMD>Telescope dap configurations<CR>";
action = "<CMD>lua require('dap.ext.vscode').load_launchjs()<CR><CMD>Telescope dap configurations<CR>";
options = {desc = "Debug Configurations";};
}
];
+1 -2
View File
@@ -7,8 +7,7 @@ let
# Create a list of import statements
imports = map (name: ./. + "/${name}") nixFiles;
in
{
in {
# Import all configuration modules automatically
imports = imports;
}
-2
View File
@@ -64,6 +64,4 @@
};
};
};
}
+4 -8
View File
@@ -118,29 +118,25 @@
{
mode = "n";
key = "gd";
action =
"<CMD>FzfLua lsp_definitions jump_to_single_result=true ignore_current_line=true<CR>";
action = "<CMD>FzfLua lsp_definitions jump_to_single_result=true ignore_current_line=true<CR>";
options = {desc = "Goto Definition";};
}
{
mode = "n";
key = "gr";
action =
"<CMD>FzfLua lsp_references jump_to_single_result=true ignore_current_line=true<CR>";
action = "<CMD>FzfLua lsp_references jump_to_single_result=true ignore_current_line=true<CR>";
options = {desc = "References";};
}
{
mode = "n";
key = "gI";
action =
"<CMD>FzfLua lsp_implementations jump_to_single_result=true ignore_current_line=true<CR>";
action = "<CMD>FzfLua lsp_implementations jump_to_single_result=true ignore_current_line=true<CR>";
options = {desc = "Goto Implementation";};
}
{
mode = "n";
key = "gy";
action =
"<CMD>FzfLua lsp_typedefs jump_to_single_result=true ignore_current_line=true<CR>";
action = "<CMD>FzfLua lsp_typedefs jump_to_single_result=true ignore_current_line=true<CR>";
options = {desc = "Goto T[y]pe Definition";};
}
{
+3 -4
View File
@@ -1,8 +1,7 @@
let
selectOpts = "{behavior = cmp.SelectBehavior.Select}";
in
{ pkgs, ... }:
{
{pkgs, ...}: {
plugins = {
cmp = {
enable = true;
@@ -150,7 +149,8 @@ in
prettier.enable = true;
# rubyfmt is broken on darwin-based systems
rubyfmt.enable = (
pkgs.stdenv.hostPlatform.system != "x86_64-darwin"
pkgs.stdenv.hostPlatform.system
!= "x86_64-darwin"
&& pkgs.stdenv.hostPlatform.system != "aarch64-darwin"
);
sqlformat.enable = true;
@@ -258,6 +258,5 @@ in
use_diagnostic_signs = true;
};
};
};
}
+4 -2
View File
@@ -6,12 +6,14 @@
options = {
always_show_bufferline = false;
buffer_close_icon = "";
offsets = [{
offsets = [
{
filetype = "neo-tree";
text = "Neo-tree";
highlight = "Directory";
text_align = "left";
}];
}
];
diagnostics = "nvim_lsp";
};
};
+2 -1
View File
@@ -26,7 +26,8 @@ let
"FloatBorder"
];
# "Buffer" + status + part
buffer_status = builtins.foldl' (acc: elem: acc ++ elem) [ ]
buffer_status =
builtins.foldl' (acc: elem: acc ++ elem) []
(builtins.map (status: builtins.map (part: "Buffer" + status + part) part)
status);
in {
+49 -16
View File
@@ -6,18 +6,31 @@
flake-parts.url = "github:hercules-ci/flake-parts";
rust-overlay.url = "github:oxalica/rust-overlay";
};
outputs = { nixvim, flake-parts, rust-overlay, ... }@inputs:
outputs =
{
nixvim,
flake-parts,
rust-overlay,
...
}@inputs:
flake-parts.lib.mkFlake { inherit inputs; } {
systems =
[ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
perSystem = { system, ... }:
systems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
perSystem =
{ system, ... }:
let
overlays = [ (import rust-overlay) ];
nixvimLib = nixvim.lib.${system};
nixvim' = nixvim.legacyPackages.${system};
baseNixvimModule = {
inherit pkgs;
module = { pkgs, ... }: {
module =
{ pkgs, ... }:
{
imports = [ ./config ];
extraPackages = with pkgs; [ sops ];
};
@@ -25,8 +38,13 @@
};
rustNixvimModule = {
inherit pkgs;
module = { pkgs, ... }: {
imports = [ ./config ./config/rust ];
module =
{ pkgs, ... }:
{
imports = [
./config
./config/rust
];
extraPackages = with pkgs; [
sops
rust-bin.stable.latest.default
@@ -36,24 +54,39 @@
};
csharpNixvimModule = {
inherit pkgs;
module = { pkgs, ... }: {
imports = [ ./config ./config/csharp ];
module =
{ pkgs, ... }:
{
imports = [
./config
./config/csharp
];
extraPackages = with pkgs; [ sops ];
};
extraSpecialArgs = { };
};
goNixvimModule = {
inherit pkgs;
module = { pkgs, ... }: {
imports = [ ./config ./config/golang ];
module =
{ pkgs, ... }:
{
imports = [
./config
./config/golang
];
extraPackages = with pkgs; [ sops ];
};
extraSpecialArgs = { };
};
pythonNixvimModule = {
inherit pkgs;
module = { pkgs, ... }: {
imports = [ ./config ./config/python ];
module =
{ pkgs, ... }:
{
imports = [
./config
./config/python
];
extraPackages = with pkgs; [ sops ];
};
extraSpecialArgs = { };
@@ -67,11 +100,11 @@
csharpNvim = nixvim'.makeNixvimWithModule csharpNixvimModule;
goNvim = nixvim'.makeNixvimWithModule goNixvimModule;
pythonNvim = nixvim'.makeNixvimWithModule pythonNixvimModule;
in {
in
{
checks = {
# Run `nix flake check .` to verify that your config is not broken
default =
nixvimLib.check.mkTestDerivationFromNixvimModule baseNixvimModule;
default = nixvimLib.check.mkTestDerivationFromNixvimModule baseNixvimModule;
};
packages = {
# Lets you run `nix run .` to start nixvim