forked from Shinonome/fred-neovim
Reformatted to alejandra style
This commit is contained in:
@@ -70,8 +70,7 @@
|
|||||||
{
|
{
|
||||||
type = "button";
|
type = "button";
|
||||||
val = " Find File ";
|
val = " Find File ";
|
||||||
on_press.__raw =
|
on_press.__raw = "function() require('telescope.builtin').find_files() end";
|
||||||
"function() require('telescope.builtin').find_files() end";
|
|
||||||
opts = {
|
opts = {
|
||||||
shortcut = "f";
|
shortcut = "f";
|
||||||
keymap = [
|
keymap = [
|
||||||
@@ -97,8 +96,7 @@
|
|||||||
{
|
{
|
||||||
type = "button";
|
type = "button";
|
||||||
val = " Recent Files ";
|
val = " Recent Files ";
|
||||||
on_press.__raw =
|
on_press.__raw = "function() require('telescope.builtin').oldfiles() end";
|
||||||
"function() require('telescope.builtin').oldfiles() end";
|
|
||||||
opts = {
|
opts = {
|
||||||
shortcut = "r";
|
shortcut = "r";
|
||||||
keymap = [
|
keymap = [
|
||||||
@@ -124,8 +122,7 @@
|
|||||||
{
|
{
|
||||||
type = "button";
|
type = "button";
|
||||||
val = " Find Text ";
|
val = " Find Text ";
|
||||||
on_press.__raw =
|
on_press.__raw = "function() require('telescope.builtin').live_grep() end";
|
||||||
"function() require('telescope.builtin').live_grep() end";
|
|
||||||
opts = {
|
opts = {
|
||||||
shortcut = "g";
|
shortcut = "g";
|
||||||
keymap = [
|
keymap = [
|
||||||
|
|||||||
+8
-10
@@ -1,4 +1,4 @@
|
|||||||
{ pkgs, ... }: {
|
{pkgs, ...}: {
|
||||||
plugins = {
|
plugins = {
|
||||||
cmp-dap.enable = true;
|
cmp-dap.enable = true;
|
||||||
dap = {
|
dap = {
|
||||||
@@ -6,9 +6,9 @@
|
|||||||
extensions = {
|
extensions = {
|
||||||
dap-ui = {
|
dap-ui = {
|
||||||
enable = true;
|
enable = true;
|
||||||
floating.mappings = { close = [ "<ESC>" "q" ]; };
|
floating.mappings = {close = ["<ESC>" "q"];};
|
||||||
};
|
};
|
||||||
dap-virtual-text = { enable = true; };
|
dap-virtual-text = {enable = true;};
|
||||||
};
|
};
|
||||||
signs = {
|
signs = {
|
||||||
dapBreakpoint = {
|
dapBreakpoint = {
|
||||||
@@ -31,8 +31,7 @@
|
|||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>dB";
|
key = "<leader>dB";
|
||||||
action =
|
action = "\n <cmd>lua require('dap').set_breakpoint(vim.fn.input('Breakpoint condition: '))<cr>\n ";
|
||||||
"\n <cmd>lua require('dap').set_breakpoint(vim.fn.input('Breakpoint condition: '))<cr>\n ";
|
|
||||||
options = {
|
options = {
|
||||||
silent = true;
|
silent = true;
|
||||||
desc = "Breakpoint Condition";
|
desc = "Breakpoint Condition";
|
||||||
@@ -192,7 +191,7 @@
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = [ "n" "v" ];
|
mode = ["n" "v"];
|
||||||
key = "<leader>de";
|
key = "<leader>de";
|
||||||
action = "<cmd>lua require('dapui').eval()<cr>";
|
action = "<cmd>lua require('dapui').eval()<cr>";
|
||||||
options = {
|
options = {
|
||||||
@@ -203,9 +202,8 @@
|
|||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>df";
|
key = "<leader>df";
|
||||||
action =
|
action = "<CMD>lua require('dap.ext.vscode').load_launchjs()<CR><CMD>Telescope dap configurations<CR>";
|
||||||
"<CMD>lua require('dap.ext.vscode').load_launchjs()<CR><CMD>Telescope dap configurations<CR>";
|
options = {desc = "Debug Configurations";};
|
||||||
options = { desc = "Debug Configurations"; };
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -216,5 +214,5 @@
|
|||||||
require('dap').listeners.before.event_exited['dapui_config'] = require('dapui').close
|
require('dap').listeners.before.event_exited['dapui_config'] = require('dapui').close
|
||||||
'';
|
'';
|
||||||
|
|
||||||
extraPlugins = [ (pkgs.vimPlugins.telescope-dap-nvim) ];
|
extraPlugins = [(pkgs.vimPlugins.telescope-dap-nvim)];
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-2
@@ -7,8 +7,7 @@ let
|
|||||||
|
|
||||||
# Create a list of import statements
|
# Create a list of import statements
|
||||||
imports = map (name: ./. + "/${name}") nixFiles;
|
imports = map (name: ./. + "/${name}") nixFiles;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
# Import all configuration modules automatically
|
# Import all configuration modules automatically
|
||||||
imports = imports;
|
imports = imports;
|
||||||
}
|
}
|
||||||
|
|||||||
+12
-14
@@ -5,11 +5,11 @@
|
|||||||
keymaps = {
|
keymaps = {
|
||||||
"<leader>/" = {
|
"<leader>/" = {
|
||||||
action = "live_grep";
|
action = "live_grep";
|
||||||
options = { desc = "Live Grep"; };
|
options = {desc = "Live Grep";};
|
||||||
};
|
};
|
||||||
"<leader>," = {
|
"<leader>," = {
|
||||||
action = "buffers";
|
action = "buffers";
|
||||||
options = { desc = "Switch Buffer"; };
|
options = {desc = "Switch Buffer";};
|
||||||
settings = {
|
settings = {
|
||||||
sort_mru = true;
|
sort_mru = true;
|
||||||
sort_lastused = true;
|
sort_lastused = true;
|
||||||
@@ -17,39 +17,39 @@
|
|||||||
};
|
};
|
||||||
"<leader>ff" = {
|
"<leader>ff" = {
|
||||||
action = "files";
|
action = "files";
|
||||||
options = { desc = "Find Files"; };
|
options = {desc = "Find Files";};
|
||||||
};
|
};
|
||||||
"<leader>fr" = {
|
"<leader>fr" = {
|
||||||
action = "oldfiles";
|
action = "oldfiles";
|
||||||
options = { desc = "Recent Files"; };
|
options = {desc = "Recent Files";};
|
||||||
};
|
};
|
||||||
"<leader>gc" = {
|
"<leader>gc" = {
|
||||||
action = "git_commits";
|
action = "git_commits";
|
||||||
options = { desc = "Git Commits"; };
|
options = {desc = "Git Commits";};
|
||||||
};
|
};
|
||||||
"<leader>gs" = {
|
"<leader>gs" = {
|
||||||
action = "git_status";
|
action = "git_status";
|
||||||
options = { desc = "Git Status"; };
|
options = {desc = "Git Status";};
|
||||||
};
|
};
|
||||||
"<leader>s\"" = {
|
"<leader>s\"" = {
|
||||||
action = "registers";
|
action = "registers";
|
||||||
options = { desc = "Registers"; };
|
options = {desc = "Registers";};
|
||||||
};
|
};
|
||||||
"<leader>sd" = {
|
"<leader>sd" = {
|
||||||
action = "diagnostics_document";
|
action = "diagnostics_document";
|
||||||
options = { desc = "Document Diagnostics"; };
|
options = {desc = "Document Diagnostics";};
|
||||||
};
|
};
|
||||||
"<leader>sD" = {
|
"<leader>sD" = {
|
||||||
action = "diagnostics_workspace";
|
action = "diagnostics_workspace";
|
||||||
options = { desc = "Workspace Diagnostics"; };
|
options = {desc = "Workspace Diagnostics";};
|
||||||
};
|
};
|
||||||
"<leader>sh" = {
|
"<leader>sh" = {
|
||||||
action = "help_tags";
|
action = "help_tags";
|
||||||
options = { desc = "Help Pages"; };
|
options = {desc = "Help Pages";};
|
||||||
};
|
};
|
||||||
"<leader>sk" = {
|
"<leader>sk" = {
|
||||||
action = "keymaps";
|
action = "keymaps";
|
||||||
options = { desc = "Key Maps"; };
|
options = {desc = "Key Maps";};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -59,11 +59,9 @@
|
|||||||
keymaps = {
|
keymaps = {
|
||||||
todoTelescope = {
|
todoTelescope = {
|
||||||
key = "<leader>st";
|
key = "<leader>st";
|
||||||
keywords = [ "TODO" ];
|
keywords = ["TODO"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+49
-53
@@ -64,19 +64,19 @@
|
|||||||
mode = "i";
|
mode = "i";
|
||||||
key = "jk";
|
key = "jk";
|
||||||
action = "<CMD>noh<CR><ESC>";
|
action = "<CMD>noh<CR><ESC>";
|
||||||
options = { desc = "Normal mode and clear highlight"; };
|
options = {desc = "Normal mode and clear highlight";};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "i";
|
mode = "i";
|
||||||
key = "<ESC>";
|
key = "<ESC>";
|
||||||
action = "<CMD>noh<CR><ESC>";
|
action = "<CMD>noh<CR><ESC>";
|
||||||
options = { desc = "Normal mode and clear highlight"; };
|
options = {desc = "Normal mode and clear highlight";};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<ESC>";
|
key = "<ESC>";
|
||||||
action = "<CMD>noh<CR><ESC>";
|
action = "<CMD>noh<CR><ESC>";
|
||||||
options = { desc = "Normal mode and clear highlight"; };
|
options = {desc = "Normal mode and clear highlight";};
|
||||||
}
|
}
|
||||||
|
|
||||||
# Add undo breakpoints
|
# Add undo breakpoints
|
||||||
@@ -84,26 +84,26 @@
|
|||||||
mode = "i";
|
mode = "i";
|
||||||
key = ",";
|
key = ",";
|
||||||
action = ",<C-g>u";
|
action = ",<C-g>u";
|
||||||
options = { desc = "Undo breakpoint"; };
|
options = {desc = "Undo breakpoint";};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "i";
|
mode = "i";
|
||||||
key = ".";
|
key = ".";
|
||||||
action = ".<C-g>u";
|
action = ".<C-g>u";
|
||||||
options = { desc = "Undo breakpoint"; };
|
options = {desc = "Undo breakpoint";};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "i";
|
mode = "i";
|
||||||
key = ";";
|
key = ";";
|
||||||
action = ";<C-g>u";
|
action = ";<C-g>u";
|
||||||
options = { desc = "Undo breakpoint"; };
|
options = {desc = "Undo breakpoint";};
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>e";
|
key = "<leader>e";
|
||||||
action = "<CMD>Neotree toggle<CR>";
|
action = "<CMD>Neotree toggle<CR>";
|
||||||
options = { desc = "Toggle tree view"; };
|
options = {desc = "Toggle tree view";};
|
||||||
}
|
}
|
||||||
|
|
||||||
# Database
|
# Database
|
||||||
@@ -111,49 +111,45 @@
|
|||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>Du";
|
key = "<leader>Du";
|
||||||
action = "<CMD>DBUI<CR>";
|
action = "<CMD>DBUI<CR>";
|
||||||
options = { desc = "Show Database UI"; };
|
options = {desc = "Show Database UI";};
|
||||||
}
|
}
|
||||||
|
|
||||||
# LSP Actions
|
# LSP Actions
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "gd";
|
key = "gd";
|
||||||
action =
|
action = "<CMD>FzfLua lsp_definitions jump_to_single_result=true ignore_current_line=true<CR>";
|
||||||
"<CMD>FzfLua lsp_definitions jump_to_single_result=true ignore_current_line=true<CR>";
|
options = {desc = "Goto Definition";};
|
||||||
options = { desc = "Goto Definition"; };
|
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "gr";
|
key = "gr";
|
||||||
action =
|
action = "<CMD>FzfLua lsp_references jump_to_single_result=true ignore_current_line=true<CR>";
|
||||||
"<CMD>FzfLua lsp_references jump_to_single_result=true ignore_current_line=true<CR>";
|
options = {desc = "References";};
|
||||||
options = { desc = "References"; };
|
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "gI";
|
key = "gI";
|
||||||
action =
|
action = "<CMD>FzfLua lsp_implementations jump_to_single_result=true ignore_current_line=true<CR>";
|
||||||
"<CMD>FzfLua lsp_implementations jump_to_single_result=true ignore_current_line=true<CR>";
|
options = {desc = "Goto Implementation";};
|
||||||
options = { desc = "Goto Implementation"; };
|
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "gy";
|
key = "gy";
|
||||||
action =
|
action = "<CMD>FzfLua lsp_typedefs jump_to_single_result=true ignore_current_line=true<CR>";
|
||||||
"<CMD>FzfLua lsp_typedefs jump_to_single_result=true ignore_current_line=true<CR>";
|
options = {desc = "Goto T[y]pe Definition";};
|
||||||
options = { desc = "Goto T[y]pe Definition"; };
|
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>cd";
|
key = "<leader>cd";
|
||||||
action = "<CMD>lua vim.diagnostic.open_float()<CR>";
|
action = "<CMD>lua vim.diagnostic.open_float()<CR>";
|
||||||
options = { desc = "Popup Diagnostics"; };
|
options = {desc = "Popup Diagnostics";};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>cD";
|
key = "<leader>cD";
|
||||||
action = "<CMD>Trouble diagnostics toggle<CR>";
|
action = "<CMD>Trouble diagnostics toggle<CR>";
|
||||||
options = { desc = "List All Diagnostics"; };
|
options = {desc = "List All Diagnostics";};
|
||||||
}
|
}
|
||||||
|
|
||||||
# SOPS
|
# SOPS
|
||||||
@@ -161,13 +157,13 @@
|
|||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>od";
|
key = "<leader>od";
|
||||||
action = "<CMD>!sops -d -i %<CR><CR>";
|
action = "<CMD>!sops -d -i %<CR><CR>";
|
||||||
options = { desc = "Decrypt SOPS File"; };
|
options = {desc = "Decrypt SOPS File";};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>oe";
|
key = "<leader>oe";
|
||||||
action = "<CMD>!sops -e -i %<CR><CR>";
|
action = "<CMD>!sops -e -i %<CR><CR>";
|
||||||
options = { desc = "Encrypt SOPS File"; };
|
options = {desc = "Encrypt SOPS File";};
|
||||||
}
|
}
|
||||||
|
|
||||||
# Git
|
# Git
|
||||||
@@ -175,53 +171,53 @@
|
|||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>gg";
|
key = "<leader>gg";
|
||||||
action = "<CMD>LazyGit<CR>";
|
action = "<CMD>LazyGit<CR>";
|
||||||
options = { desc = "LazyGit"; };
|
options = {desc = "LazyGit";};
|
||||||
}
|
}
|
||||||
|
|
||||||
# Windows
|
# Windows
|
||||||
{
|
{
|
||||||
key = "<C-h>";
|
key = "<C-h>";
|
||||||
action = "<CMD>wincmd h<CR>";
|
action = "<CMD>wincmd h<CR>";
|
||||||
options = { desc = "Navigate Window Left"; };
|
options = {desc = "Navigate Window Left";};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
key = "<C-j>";
|
key = "<C-j>";
|
||||||
action = "<CMD>wincmd j<CR>";
|
action = "<CMD>wincmd j<CR>";
|
||||||
options = { desc = "Navigate Window Down"; };
|
options = {desc = "Navigate Window Down";};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
key = "<C-k>";
|
key = "<C-k>";
|
||||||
action = "<CMD>wincmd k<CR>";
|
action = "<CMD>wincmd k<CR>";
|
||||||
options = { desc = "Navigate Window Up"; };
|
options = {desc = "Navigate Window Up";};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
key = "<C-l>";
|
key = "<C-l>";
|
||||||
action = "<CMD>wincmd l<CR>";
|
action = "<CMD>wincmd l<CR>";
|
||||||
options = { desc = "Navigate Window Right"; };
|
options = {desc = "Navigate Window Right";};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>w";
|
key = "<leader>w";
|
||||||
action = "<c-w>";
|
action = "<c-w>";
|
||||||
options = { desc = "Windows"; };
|
options = {desc = "Windows";};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>-";
|
key = "<leader>-";
|
||||||
action = "<C-W>s";
|
action = "<C-W>s";
|
||||||
options = { desc = "Split Window Below"; };
|
options = {desc = "Split Window Below";};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>|";
|
key = "<leader>|";
|
||||||
action = "<C-W>v";
|
action = "<C-W>v";
|
||||||
options = { desc = "Split Window Right"; };
|
options = {desc = "Split Window Right";};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>wd";
|
key = "<leader>wd";
|
||||||
action = "<C-W>c";
|
action = "<C-W>c";
|
||||||
options = { desc = "Delete Window"; };
|
options = {desc = "Delete Window";};
|
||||||
}
|
}
|
||||||
|
|
||||||
# Tabs
|
# Tabs
|
||||||
@@ -229,43 +225,43 @@
|
|||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader><tab>l";
|
key = "<leader><tab>l";
|
||||||
action = "<CMD>tablast<CR>";
|
action = "<CMD>tablast<CR>";
|
||||||
options = { desc = "Last Tab"; };
|
options = {desc = "Last Tab";};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader><tab>o";
|
key = "<leader><tab>o";
|
||||||
action = "<CMD>tabonly<CR>";
|
action = "<CMD>tabonly<CR>";
|
||||||
options = { desc = "Close Other Tabs"; };
|
options = {desc = "Close Other Tabs";};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader><tab>f";
|
key = "<leader><tab>f";
|
||||||
action = "<CMD>tabfirst<CR>";
|
action = "<CMD>tabfirst<CR>";
|
||||||
options = { desc = "First Tab"; };
|
options = {desc = "First Tab";};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader><tab><tab>";
|
key = "<leader><tab><tab>";
|
||||||
action = "<CMD>tabnew<CR>";
|
action = "<CMD>tabnew<CR>";
|
||||||
options = { desc = "New Tab"; };
|
options = {desc = "New Tab";};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader><tab>]";
|
key = "<leader><tab>]";
|
||||||
action = "<CMD>tabnext<CR>";
|
action = "<CMD>tabnext<CR>";
|
||||||
options = { desc = "Next Tab"; };
|
options = {desc = "Next Tab";};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader><tab>d";
|
key = "<leader><tab>d";
|
||||||
action = "<CMD>tabclose<CR>";
|
action = "<CMD>tabclose<CR>";
|
||||||
options = { desc = "Close Tab"; };
|
options = {desc = "Close Tab";};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader><tab>[";
|
key = "<leader><tab>[";
|
||||||
action = "<CMD>tabprevious<CR>";
|
action = "<CMD>tabprevious<CR>";
|
||||||
options = { desc = "Previous Tab"; };
|
options = {desc = "Previous Tab";};
|
||||||
}
|
}
|
||||||
|
|
||||||
# Buffer
|
# Buffer
|
||||||
@@ -273,55 +269,55 @@
|
|||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<S-h>";
|
key = "<S-h>";
|
||||||
action = "<CMD>bprevious<CR>";
|
action = "<CMD>bprevious<CR>";
|
||||||
options = { desc = "Previous Buffer"; };
|
options = {desc = "Previous Buffer";};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<S-l>";
|
key = "<S-l>";
|
||||||
action = "<CMD>bnext<CR>";
|
action = "<CMD>bnext<CR>";
|
||||||
options = { desc = "Next Buffer"; };
|
options = {desc = "Next Buffer";};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>bb";
|
key = "<leader>bb";
|
||||||
action = "<CMD>e #<CR>";
|
action = "<CMD>e #<CR>";
|
||||||
options = { desc = "Switch To Other Buffer"; };
|
options = {desc = "Switch To Other Buffer";};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>bd";
|
key = "<leader>bd";
|
||||||
action = "<CMD>bd<CR>";
|
action = "<CMD>bd<CR>";
|
||||||
options = { desc = "Delete Buffer and Window"; };
|
options = {desc = "Delete Buffer and Window";};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>bp";
|
key = "<leader>bp";
|
||||||
action = "<CMD>BufferLineTogglePin<CR>";
|
action = "<CMD>BufferLineTogglePin<CR>";
|
||||||
options = { desc = "Toggle Pin"; };
|
options = {desc = "Toggle Pin";};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>bP";
|
key = "<leader>bP";
|
||||||
action = "<CMD>BufferLineGroupClose ungrouped<CR>";
|
action = "<CMD>BufferLineGroupClose ungrouped<CR>";
|
||||||
options = { desc = "Delete Non-Pinned Buffers"; };
|
options = {desc = "Delete Non-Pinned Buffers";};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>bo";
|
key = "<leader>bo";
|
||||||
action = "<CMD>BufferLineCloseOthers<CR>";
|
action = "<CMD>BufferLineCloseOthers<CR>";
|
||||||
options = { desc = "Delete Other Buffers"; };
|
options = {desc = "Delete Other Buffers";};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>br";
|
key = "<leader>br";
|
||||||
action = "<CMD>BufferLineCloseRight<CR>";
|
action = "<CMD>BufferLineCloseRight<CR>";
|
||||||
options = { desc = "Delete Buffers to the Right"; };
|
options = {desc = "Delete Buffers to the Right";};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>bl";
|
key = "<leader>bl";
|
||||||
action = "<CMD>BufferLineCloseLeft<CR>";
|
action = "<CMD>BufferLineCloseLeft<CR>";
|
||||||
options = { desc = "Delete Buffers to the Left"; };
|
options = {desc = "Delete Buffers to the Left";};
|
||||||
}
|
}
|
||||||
|
|
||||||
# DAP Telescope Actions
|
# DAP Telescope Actions
|
||||||
@@ -329,25 +325,25 @@
|
|||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>d/c";
|
key = "<leader>d/c";
|
||||||
action = "<CMD>Telescope dap commands<CR>";
|
action = "<CMD>Telescope dap commands<CR>";
|
||||||
options = { desc = "Search Commands"; };
|
options = {desc = "Search Commands";};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>d/b";
|
key = "<leader>d/b";
|
||||||
action = "<CMD>Telescope dap list_breakpoints<CR>";
|
action = "<CMD>Telescope dap list_breakpoints<CR>";
|
||||||
options = { desc = "Search Breakpoints"; };
|
options = {desc = "Search Breakpoints";};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>d/v";
|
key = "<leader>d/v";
|
||||||
action = "<CMD>Telescope dap variables<CR>";
|
action = "<CMD>Telescope dap variables<CR>";
|
||||||
options = { desc = "Search Variables"; };
|
options = {desc = "Search Variables";};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>d/f";
|
key = "<leader>d/f";
|
||||||
action = "<CMD>Telescope dap frames<CR>";
|
action = "<CMD>Telescope dap frames<CR>";
|
||||||
options = { desc = "Search Frames"; };
|
options = {desc = "Search Frames";};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
+247
-248
@@ -1,263 +1,262 @@
|
|||||||
let
|
let
|
||||||
selectOpts = "{behavior = cmp.SelectBehavior.Select}";
|
selectOpts = "{behavior = cmp.SelectBehavior.Select}";
|
||||||
in
|
in
|
||||||
{ pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
{
|
plugins = {
|
||||||
plugins = {
|
cmp = {
|
||||||
cmp = {
|
enable = true;
|
||||||
enable = true;
|
settings = {
|
||||||
settings = {
|
autoEnableSources = true;
|
||||||
autoEnableSources = true;
|
performance = {
|
||||||
performance = {
|
debounce = 150;
|
||||||
debounce = 150;
|
};
|
||||||
};
|
sources = [
|
||||||
sources = [
|
{name = "path";}
|
||||||
{ name = "path"; }
|
{
|
||||||
{
|
name = "nvim_lsp";
|
||||||
name = "nvim_lsp";
|
keywordLength = 1;
|
||||||
keywordLength = 1;
|
}
|
||||||
}
|
{
|
||||||
{
|
name = "buffer";
|
||||||
name = "buffer";
|
keywordLength = 3;
|
||||||
keywordLength = 3;
|
}
|
||||||
}
|
{name = "supermaven";}
|
||||||
{ name = "supermaven"; }
|
|
||||||
];
|
|
||||||
|
|
||||||
snippet.expand = "function(args) require('luasnip').lsp_expand(args.body) end";
|
|
||||||
formatting = {
|
|
||||||
fields = [
|
|
||||||
"menu"
|
|
||||||
"abbr"
|
|
||||||
"kind"
|
|
||||||
];
|
];
|
||||||
format = ''
|
|
||||||
function(entry, item)
|
|
||||||
local menu_icon = {
|
|
||||||
nvim_lsp = '[LSP]',
|
|
||||||
luasnip = '[SNIP]',
|
|
||||||
buffer = '[BUF]',
|
|
||||||
path = '[PATH]',
|
|
||||||
}
|
|
||||||
|
|
||||||
item.menu = menu_icon[entry.source.name]
|
snippet.expand = "function(args) require('luasnip').lsp_expand(args.body) end";
|
||||||
return item
|
formatting = {
|
||||||
end
|
fields = [
|
||||||
'';
|
"menu"
|
||||||
};
|
"abbr"
|
||||||
|
"kind"
|
||||||
|
];
|
||||||
|
format = ''
|
||||||
|
function(entry, item)
|
||||||
|
local menu_icon = {
|
||||||
|
nvim_lsp = '[LSP]',
|
||||||
|
luasnip = '[SNIP]',
|
||||||
|
buffer = '[BUF]',
|
||||||
|
path = '[PATH]',
|
||||||
|
}
|
||||||
|
|
||||||
mapping = {
|
item.menu = menu_icon[entry.source.name]
|
||||||
"<Up>" = "cmp.mapping.select_prev_item(${selectOpts})";
|
return item
|
||||||
"<Down>" = "cmp.mapping.select_next_item(${selectOpts})";
|
end
|
||||||
|
'';
|
||||||
"<C-p>" = "cmp.mapping.select_prev_item(${selectOpts})";
|
|
||||||
"<C-n>" = "cmp.mapping.select_next_item(${selectOpts})";
|
|
||||||
|
|
||||||
"<C-u>" = "cmp.mapping.scroll_docs(-4)";
|
|
||||||
"<C-d>" = "cmp.mapping.scroll_docs(4)";
|
|
||||||
|
|
||||||
"<C-e>" = "cmp.mapping.abort()";
|
|
||||||
"<C-y>" = "cmp.mapping.confirm({select = true})";
|
|
||||||
"<CR>" = "cmp.mapping.confirm({select = false})";
|
|
||||||
|
|
||||||
"<C-f>" = ''
|
|
||||||
cmp.mapping(
|
|
||||||
function(fallback)
|
|
||||||
if luasnip.jumpable(1) then
|
|
||||||
luasnip.jump(1)
|
|
||||||
else
|
|
||||||
fallback()
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
{ "i", "s" }
|
|
||||||
)
|
|
||||||
'';
|
|
||||||
|
|
||||||
"<C-b>" = ''
|
|
||||||
cmp.mapping(
|
|
||||||
function(fallback)
|
|
||||||
if luasnip.jumpable(-1) then
|
|
||||||
luasnip.jump(-1)
|
|
||||||
else
|
|
||||||
fallback()
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
{ "i", "s" }
|
|
||||||
)
|
|
||||||
'';
|
|
||||||
|
|
||||||
"<Tab>" = ''
|
|
||||||
cmp.mapping(
|
|
||||||
function(fallback)
|
|
||||||
local col = vim.fn.col('.') - 1
|
|
||||||
|
|
||||||
if cmp.visible() then
|
|
||||||
cmp.select_next_item(select_opts)
|
|
||||||
elseif col == 0 or vim.fn.getline('.'):sub(col, col):match('%s') then
|
|
||||||
fallback()
|
|
||||||
else
|
|
||||||
cmp.complete()
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
{ "i", "s" }
|
|
||||||
)
|
|
||||||
'';
|
|
||||||
|
|
||||||
"<S-Tab>" = ''
|
|
||||||
cmp.mapping(
|
|
||||||
function(fallback)
|
|
||||||
if cmp.visible() then
|
|
||||||
cmp.select_prev_item(select_opts)
|
|
||||||
else
|
|
||||||
fallback()
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
{ "i", "s" }
|
|
||||||
)
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
window = {
|
|
||||||
completion = {
|
|
||||||
border = "rounded";
|
|
||||||
winhighlight = "Normal:Normal,FloatBorder:Normal,CursorLine:Visual,Search:None";
|
|
||||||
zindex = 1001;
|
|
||||||
scrolloff = 0;
|
|
||||||
colOffset = 0;
|
|
||||||
sidePadding = 1;
|
|
||||||
scrollbar = true;
|
|
||||||
};
|
};
|
||||||
documentation = {
|
|
||||||
border = "rounded";
|
mapping = {
|
||||||
winhighlight = "Normal:Normal,FloatBorder:Normal,CursorLine:Visual,Search:None";
|
"<Up>" = "cmp.mapping.select_prev_item(${selectOpts})";
|
||||||
zindex = 1001;
|
"<Down>" = "cmp.mapping.select_next_item(${selectOpts})";
|
||||||
maxHeight = 20;
|
|
||||||
|
"<C-p>" = "cmp.mapping.select_prev_item(${selectOpts})";
|
||||||
|
"<C-n>" = "cmp.mapping.select_next_item(${selectOpts})";
|
||||||
|
|
||||||
|
"<C-u>" = "cmp.mapping.scroll_docs(-4)";
|
||||||
|
"<C-d>" = "cmp.mapping.scroll_docs(4)";
|
||||||
|
|
||||||
|
"<C-e>" = "cmp.mapping.abort()";
|
||||||
|
"<C-y>" = "cmp.mapping.confirm({select = true})";
|
||||||
|
"<CR>" = "cmp.mapping.confirm({select = false})";
|
||||||
|
|
||||||
|
"<C-f>" = ''
|
||||||
|
cmp.mapping(
|
||||||
|
function(fallback)
|
||||||
|
if luasnip.jumpable(1) then
|
||||||
|
luasnip.jump(1)
|
||||||
|
else
|
||||||
|
fallback()
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
{ "i", "s" }
|
||||||
|
)
|
||||||
|
'';
|
||||||
|
|
||||||
|
"<C-b>" = ''
|
||||||
|
cmp.mapping(
|
||||||
|
function(fallback)
|
||||||
|
if luasnip.jumpable(-1) then
|
||||||
|
luasnip.jump(-1)
|
||||||
|
else
|
||||||
|
fallback()
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
{ "i", "s" }
|
||||||
|
)
|
||||||
|
'';
|
||||||
|
|
||||||
|
"<Tab>" = ''
|
||||||
|
cmp.mapping(
|
||||||
|
function(fallback)
|
||||||
|
local col = vim.fn.col('.') - 1
|
||||||
|
|
||||||
|
if cmp.visible() then
|
||||||
|
cmp.select_next_item(select_opts)
|
||||||
|
elseif col == 0 or vim.fn.getline('.'):sub(col, col):match('%s') then
|
||||||
|
fallback()
|
||||||
|
else
|
||||||
|
cmp.complete()
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
{ "i", "s" }
|
||||||
|
)
|
||||||
|
'';
|
||||||
|
|
||||||
|
"<S-Tab>" = ''
|
||||||
|
cmp.mapping(
|
||||||
|
function(fallback)
|
||||||
|
if cmp.visible() then
|
||||||
|
cmp.select_prev_item(select_opts)
|
||||||
|
else
|
||||||
|
fallback()
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
{ "i", "s" }
|
||||||
|
)
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
window = {
|
||||||
|
completion = {
|
||||||
|
border = "rounded";
|
||||||
|
winhighlight = "Normal:Normal,FloatBorder:Normal,CursorLine:Visual,Search:None";
|
||||||
|
zindex = 1001;
|
||||||
|
scrolloff = 0;
|
||||||
|
colOffset = 0;
|
||||||
|
sidePadding = 1;
|
||||||
|
scrollbar = true;
|
||||||
|
};
|
||||||
|
documentation = {
|
||||||
|
border = "rounded";
|
||||||
|
winhighlight = "Normal:Normal,FloatBorder:Normal,CursorLine:Visual,Search:None";
|
||||||
|
zindex = 1001;
|
||||||
|
maxHeight = 20;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
cmp-nvim-lsp.enable = true;
|
||||||
cmp-nvim-lsp.enable = true;
|
cmp-buffer.enable = true;
|
||||||
cmp-buffer.enable = true;
|
cmp-path.enable = true;
|
||||||
cmp-path.enable = true;
|
cmp-treesitter.enable = true;
|
||||||
cmp-treesitter.enable = true;
|
dap.enable = true;
|
||||||
dap.enable = true;
|
none-ls = {
|
||||||
none-ls = {
|
enable = true;
|
||||||
enable = true;
|
sources.formatting = {
|
||||||
sources.formatting = {
|
alejandra.enable = true;
|
||||||
alejandra.enable = true;
|
hclfmt.enable = true;
|
||||||
hclfmt.enable = true;
|
just.enable = true;
|
||||||
just.enable = true;
|
opentofu_fmt.enable = true;
|
||||||
opentofu_fmt.enable = true;
|
prettier.enable = true;
|
||||||
prettier.enable = true;
|
# rubyfmt is broken on darwin-based systems
|
||||||
# rubyfmt is broken on darwin-based systems
|
rubyfmt.enable = (
|
||||||
rubyfmt.enable = (
|
pkgs.stdenv.hostPlatform.system
|
||||||
pkgs.stdenv.hostPlatform.system != "x86_64-darwin"
|
!= "x86_64-darwin"
|
||||||
&& pkgs.stdenv.hostPlatform.system != "aarch64-darwin"
|
&& pkgs.stdenv.hostPlatform.system != "aarch64-darwin"
|
||||||
);
|
);
|
||||||
sqlformat.enable = true;
|
sqlformat.enable = true;
|
||||||
stylua.enable = true;
|
stylua.enable = true;
|
||||||
yamlfmt.enable = true;
|
yamlfmt.enable = true;
|
||||||
};
|
|
||||||
sources.diagnostics = {
|
|
||||||
trivy.enable = true;
|
|
||||||
yamllint.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
conform-nvim = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
format_on_save = {
|
|
||||||
lsp_fallback = "fallback";
|
|
||||||
timeout_ms = 500;
|
|
||||||
};
|
};
|
||||||
notify_on_error = true;
|
sources.diagnostics = {
|
||||||
|
trivy.enable = true;
|
||||||
|
yamllint.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
formatters_by_ft = {
|
conform-nvim = {
|
||||||
css = [ "prettier" ];
|
enable = true;
|
||||||
html = [ "prettier" ];
|
settings = {
|
||||||
javascript = [ "prettier" ];
|
format_on_save = {
|
||||||
javascriptreact = [ "prettier" ];
|
lsp_fallback = "fallback";
|
||||||
json = [ "prettier" ];
|
timeout_ms = 500;
|
||||||
just = [ "just" ];
|
};
|
||||||
lua = [ "stylua" ];
|
notify_on_error = true;
|
||||||
markdown = [ "prettier" ];
|
|
||||||
nix = [ "alejandra" ];
|
formatters_by_ft = {
|
||||||
ruby = [ "rubyfmt" ];
|
css = ["prettier"];
|
||||||
terraform = [ "tofu_fmt" ];
|
html = ["prettier"];
|
||||||
tf = [ "tofu_fmt" ];
|
javascript = ["prettier"];
|
||||||
typescript = [ "prettier" ];
|
javascriptreact = ["prettier"];
|
||||||
typescriptreact = [ "prettier" ];
|
json = ["prettier"];
|
||||||
yaml = [ "yamlfmt" ];
|
just = ["just"];
|
||||||
|
lua = ["stylua"];
|
||||||
|
markdown = ["prettier"];
|
||||||
|
nix = ["alejandra"];
|
||||||
|
ruby = ["rubyfmt"];
|
||||||
|
terraform = ["tofu_fmt"];
|
||||||
|
tf = ["tofu_fmt"];
|
||||||
|
typescript = ["prettier"];
|
||||||
|
typescriptreact = ["prettier"];
|
||||||
|
yaml = ["yamlfmt"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
lsp = {
|
||||||
|
enable = true;
|
||||||
|
inlayHints = true;
|
||||||
|
keymaps = {
|
||||||
|
diagnostic = {
|
||||||
|
"<leader>E" = "open_float";
|
||||||
|
"[" = "goto_prev";
|
||||||
|
"]" = "goto_next";
|
||||||
|
"<leader>do" = "setloclist";
|
||||||
|
};
|
||||||
|
lspBuf = {
|
||||||
|
"K" = "hover";
|
||||||
|
"gD" = "declaration";
|
||||||
|
"gd" = "definition";
|
||||||
|
"gr" = "references";
|
||||||
|
"gI" = "implementation";
|
||||||
|
"gy" = "type_definition";
|
||||||
|
"<leader>rn" = "rename";
|
||||||
|
"<leader>ca" = "code_action";
|
||||||
|
"<leader>wl" = "list_workspace_folders";
|
||||||
|
"<leader>wr" = "remove_workspace_folder";
|
||||||
|
"<leader>wa" = "add_workspace_folder";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
preConfig = ''
|
||||||
|
vim.diagnostic.config({
|
||||||
|
virtual_text = false,
|
||||||
|
severity_sort = true,
|
||||||
|
float = {
|
||||||
|
border = 'rounded',
|
||||||
|
source = 'always',
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.lsp.handlers['textDocument/hover'] = vim.lsp.with(
|
||||||
|
vim.lsp.handlers.hover,
|
||||||
|
{border = 'rounded'}
|
||||||
|
)
|
||||||
|
|
||||||
|
vim.lsp.handlers['textDocument/signatureHelp'] = vim.lsp.with(
|
||||||
|
vim.lsp.handlers.signature_help,
|
||||||
|
{border = 'rounded'}
|
||||||
|
)
|
||||||
|
'';
|
||||||
|
postConfig = ''
|
||||||
|
local signs = { Error = " ", Warn = " ", Hint = " ", Info = " " }
|
||||||
|
for type, icon in pairs(signs) do
|
||||||
|
local hl = "DiagnosticSign" .. type
|
||||||
|
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" })
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
servers = {
|
||||||
|
jsonls.enable = true;
|
||||||
|
marksman.enable = true;
|
||||||
|
nil-ls.enable = true;
|
||||||
|
nixd.enable = true;
|
||||||
|
yamlls.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
trouble = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
use_diagnostic_signs = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
}
|
||||||
lsp = {
|
|
||||||
enable = true;
|
|
||||||
inlayHints = true;
|
|
||||||
keymaps = {
|
|
||||||
diagnostic = {
|
|
||||||
"<leader>E" = "open_float";
|
|
||||||
"[" = "goto_prev";
|
|
||||||
"]" = "goto_next";
|
|
||||||
"<leader>do" = "setloclist";
|
|
||||||
};
|
|
||||||
lspBuf = {
|
|
||||||
"K" = "hover";
|
|
||||||
"gD" = "declaration";
|
|
||||||
"gd" = "definition";
|
|
||||||
"gr" = "references";
|
|
||||||
"gI" = "implementation";
|
|
||||||
"gy" = "type_definition";
|
|
||||||
"<leader>rn" = "rename";
|
|
||||||
"<leader>ca" = "code_action";
|
|
||||||
"<leader>wl" = "list_workspace_folders";
|
|
||||||
"<leader>wr" = "remove_workspace_folder";
|
|
||||||
"<leader>wa" = "add_workspace_folder";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
preConfig = ''
|
|
||||||
vim.diagnostic.config({
|
|
||||||
virtual_text = false,
|
|
||||||
severity_sort = true,
|
|
||||||
float = {
|
|
||||||
border = 'rounded',
|
|
||||||
source = 'always',
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.lsp.handlers['textDocument/hover'] = vim.lsp.with(
|
|
||||||
vim.lsp.handlers.hover,
|
|
||||||
{border = 'rounded'}
|
|
||||||
)
|
|
||||||
|
|
||||||
vim.lsp.handlers['textDocument/signatureHelp'] = vim.lsp.with(
|
|
||||||
vim.lsp.handlers.signature_help,
|
|
||||||
{border = 'rounded'}
|
|
||||||
)
|
|
||||||
'';
|
|
||||||
postConfig = ''
|
|
||||||
local signs = { Error = " ", Warn = " ", Hint = " ", Info = " " }
|
|
||||||
for type, icon in pairs(signs) do
|
|
||||||
local hl = "DiagnosticSign" .. type
|
|
||||||
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" })
|
|
||||||
end
|
|
||||||
'';
|
|
||||||
servers = {
|
|
||||||
jsonls.enable = true;
|
|
||||||
marksman.enable = true;
|
|
||||||
nil-ls.enable = true;
|
|
||||||
nixd.enable = true;
|
|
||||||
yamlls.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
trouble = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
use_diagnostic_signs = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
{ pkgs, ... }: {
|
{pkgs, ...}: {
|
||||||
extraPlugins = with pkgs; [
|
extraPlugins = with pkgs; [
|
||||||
vimPlugins.supermaven-nvim # AI code completion
|
vimPlugins.supermaven-nvim # AI code completion
|
||||||
vimPlugins.vim-dadbod # DB client
|
vimPlugins.vim-dadbod # DB client
|
||||||
|
|||||||
+17
-15
@@ -6,12 +6,14 @@
|
|||||||
options = {
|
options = {
|
||||||
always_show_bufferline = false;
|
always_show_bufferline = false;
|
||||||
buffer_close_icon = "";
|
buffer_close_icon = "";
|
||||||
offsets = [{
|
offsets = [
|
||||||
filetype = "neo-tree";
|
{
|
||||||
text = "Neo-tree";
|
filetype = "neo-tree";
|
||||||
highlight = "Directory";
|
text = "Neo-tree";
|
||||||
text_align = "left";
|
highlight = "Directory";
|
||||||
}];
|
text_align = "left";
|
||||||
|
}
|
||||||
|
];
|
||||||
diagnostics = "nvim_lsp";
|
diagnostics = "nvim_lsp";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -27,14 +29,14 @@
|
|||||||
};
|
};
|
||||||
signcolumn = true;
|
signcolumn = true;
|
||||||
signs = {
|
signs = {
|
||||||
add = { text = "│"; };
|
add = {text = "│";};
|
||||||
change = { text = "│"; };
|
change = {text = "│";};
|
||||||
changedelete = { text = "~"; };
|
changedelete = {text = "~";};
|
||||||
delete = { text = "_"; };
|
delete = {text = "_";};
|
||||||
topdelete = { text = "‾"; };
|
topdelete = {text = "‾";};
|
||||||
untracked = { text = "┆"; };
|
untracked = {text = "┆";};
|
||||||
};
|
};
|
||||||
watch_gitdir = { follow_files = true; };
|
watch_gitdir = {follow_files = true;};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -50,10 +52,10 @@
|
|||||||
mini = {
|
mini = {
|
||||||
enable = true;
|
enable = true;
|
||||||
modules = {
|
modules = {
|
||||||
surround = { };
|
surround = {};
|
||||||
indentscope = {
|
indentscope = {
|
||||||
symbol = "│";
|
symbol = "│";
|
||||||
options = { try_as_border = true; };
|
options = {try_as_border = true;};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@
|
|||||||
onedark = {
|
onedark = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
colors = { yellow = "#d9a950"; };
|
colors = {yellow = "#d9a950";};
|
||||||
style = "dark";
|
style = "dark";
|
||||||
transparent = true;
|
transparent = true;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
let
|
let
|
||||||
status = [ "Alternate" "Current" "Inactive" "Visible" ];
|
status = ["Alternate" "Current" "Inactive" "Visible"];
|
||||||
part = [
|
part = [
|
||||||
"ADDED"
|
"ADDED"
|
||||||
"CHANGED"
|
"CHANGED"
|
||||||
@@ -26,7 +26,8 @@ let
|
|||||||
"FloatBorder"
|
"FloatBorder"
|
||||||
];
|
];
|
||||||
# "Buffer" + status + part
|
# "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)
|
(builtins.map (status: builtins.map (part: "Buffer" + status + part) part)
|
||||||
status);
|
status);
|
||||||
in {
|
in {
|
||||||
|
|||||||
@@ -6,56 +6,89 @@
|
|||||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||||
rust-overlay.url = "github:oxalica/rust-overlay";
|
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; } {
|
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||||
systems =
|
systems = [
|
||||||
[ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
|
"x86_64-linux"
|
||||||
perSystem = { system, ... }:
|
"aarch64-linux"
|
||||||
|
"x86_64-darwin"
|
||||||
|
"aarch64-darwin"
|
||||||
|
];
|
||||||
|
perSystem =
|
||||||
|
{ system, ... }:
|
||||||
let
|
let
|
||||||
overlays = [ (import rust-overlay) ];
|
overlays = [ (import rust-overlay) ];
|
||||||
nixvimLib = nixvim.lib.${system};
|
nixvimLib = nixvim.lib.${system};
|
||||||
nixvim' = nixvim.legacyPackages.${system};
|
nixvim' = nixvim.legacyPackages.${system};
|
||||||
baseNixvimModule = {
|
baseNixvimModule = {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
module = { pkgs, ... }: {
|
module =
|
||||||
imports = [ ./config ];
|
{ pkgs, ... }:
|
||||||
extraPackages = with pkgs; [ sops ];
|
{
|
||||||
};
|
imports = [ ./config ];
|
||||||
|
extraPackages = with pkgs; [ sops ];
|
||||||
|
};
|
||||||
extraSpecialArgs = { };
|
extraSpecialArgs = { };
|
||||||
};
|
};
|
||||||
rustNixvimModule = {
|
rustNixvimModule = {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
module = { pkgs, ... }: {
|
module =
|
||||||
imports = [ ./config ./config/rust ];
|
{ pkgs, ... }:
|
||||||
extraPackages = with pkgs; [
|
{
|
||||||
sops
|
imports = [
|
||||||
rust-bin.stable.latest.default
|
./config
|
||||||
];
|
./config/rust
|
||||||
};
|
];
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
sops
|
||||||
|
rust-bin.stable.latest.default
|
||||||
|
];
|
||||||
|
};
|
||||||
extraSpecialArgs = { };
|
extraSpecialArgs = { };
|
||||||
};
|
};
|
||||||
csharpNixvimModule = {
|
csharpNixvimModule = {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
module = { pkgs, ... }: {
|
module =
|
||||||
imports = [ ./config ./config/csharp ];
|
{ pkgs, ... }:
|
||||||
extraPackages = with pkgs; [ sops ];
|
{
|
||||||
};
|
imports = [
|
||||||
|
./config
|
||||||
|
./config/csharp
|
||||||
|
];
|
||||||
|
extraPackages = with pkgs; [ sops ];
|
||||||
|
};
|
||||||
extraSpecialArgs = { };
|
extraSpecialArgs = { };
|
||||||
};
|
};
|
||||||
goNixvimModule = {
|
goNixvimModule = {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
module = { pkgs, ... }: {
|
module =
|
||||||
imports = [ ./config ./config/golang ];
|
{ pkgs, ... }:
|
||||||
extraPackages = with pkgs; [ sops ];
|
{
|
||||||
};
|
imports = [
|
||||||
|
./config
|
||||||
|
./config/golang
|
||||||
|
];
|
||||||
|
extraPackages = with pkgs; [ sops ];
|
||||||
|
};
|
||||||
extraSpecialArgs = { };
|
extraSpecialArgs = { };
|
||||||
};
|
};
|
||||||
pythonNixvimModule = {
|
pythonNixvimModule = {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
module = { pkgs, ... }: {
|
module =
|
||||||
imports = [ ./config ./config/python ];
|
{ pkgs, ... }:
|
||||||
extraPackages = with pkgs; [ sops ];
|
{
|
||||||
};
|
imports = [
|
||||||
|
./config
|
||||||
|
./config/python
|
||||||
|
];
|
||||||
|
extraPackages = with pkgs; [ sops ];
|
||||||
|
};
|
||||||
extraSpecialArgs = { };
|
extraSpecialArgs = { };
|
||||||
};
|
};
|
||||||
pkgs = import inputs.nixpkgs {
|
pkgs = import inputs.nixpkgs {
|
||||||
@@ -67,11 +100,11 @@
|
|||||||
csharpNvim = nixvim'.makeNixvimWithModule csharpNixvimModule;
|
csharpNvim = nixvim'.makeNixvimWithModule csharpNixvimModule;
|
||||||
goNvim = nixvim'.makeNixvimWithModule goNixvimModule;
|
goNvim = nixvim'.makeNixvimWithModule goNixvimModule;
|
||||||
pythonNvim = nixvim'.makeNixvimWithModule pythonNixvimModule;
|
pythonNvim = nixvim'.makeNixvimWithModule pythonNixvimModule;
|
||||||
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 =
|
default = nixvimLib.check.mkTestDerivationFromNixvimModule baseNixvimModule;
|
||||||
nixvimLib.check.mkTestDerivationFromNixvimModule baseNixvimModule;
|
|
||||||
};
|
};
|
||||||
packages = {
|
packages = {
|
||||||
# Lets you run `nix run .` to start nixvim
|
# Lets you run `nix run .` to start nixvim
|
||||||
|
|||||||
Reference in New Issue
Block a user