mirror of
https://github.com/fred-drake/neovim.git
synced 2026-06-05 14:59:28 -05:00
Reformatted to alejandra style
This commit is contained in:
@@ -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 = [
|
||||
|
||||
@@ -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
@@ -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;
|
||||
}
|
||||
|
||||
@@ -64,6 +64,4 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
+4
-8
@@ -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
@@ -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
@@ -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";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user