From 8fbcfc8698f97fc4701d09cb3de3e095d5ddd7c7 Mon Sep 17 00:00:00 2001 From: Soispha Date: Sun, 8 Oct 2023 13:12:44 +0200 Subject: fix(hm/conf/nvim): Update to new keymap format --- hm/soispha/conf/nvim/mappings/default.nix | 512 ++++++++++++--------- hm/soispha/conf/nvim/plgs/comment-nvim/default.nix | 48 +- hm/soispha/conf/nvim/plgs/debugprint/default.nix | 119 +++-- hm/soispha/conf/nvim/plgs/femaco/default.nix | 18 +- hm/soispha/conf/nvim/plgs/goto-preview/default.nix | 44 +- hm/soispha/conf/nvim/plgs/harpoon/default.nix | 67 +-- hm/soispha/conf/nvim/plgs/leap/default.nix | 57 +-- hm/soispha/conf/nvim/plgs/lsp/keymaps/default.nix | 36 +- .../plgs/telescope/extensions/bibtex/default.nix | 12 +- .../plgs/telescope/extensions/frecency/default.nix | 18 +- .../plgs/telescope/extensions/symbols/default.nix | 90 ++-- hm/soispha/conf/taskwarrior/hooks/default.nix | 4 +- hm/soispha/conf/taskwarrior/taskd/user_id.nix | Bin 84 -> 84 bytes sys/secrets/default.nix | 1 - 14 files changed, 552 insertions(+), 474 deletions(-) diff --git a/hm/soispha/conf/nvim/mappings/default.nix b/hm/soispha/conf/nvim/mappings/default.nix index 1f778d24..d5b4dd30 100644 --- a/hm/soispha/conf/nvim/mappings/default.nix +++ b/hm/soispha/conf/nvim/mappings/default.nix @@ -4,241 +4,297 @@ mapleader = " "; maplocalleader = " "; }; - maps = let - normal_and_insert = { - "" = { - action = "noh"; - desc = "Disable the search highlighting and send Escape"; - }; - }; - in { - insert = - lib.recursiveUpdate { - "hh" = { - action = '' - function() - local cmp = require('cmp'); - local luasnip = require('luasnip'); - - if cmp.visible() then - cmp.select_next_item() - elseif luasnip.expand_or_locally_jumpable() then - luasnip.expand_or_jump() - end - end - ''; - lua = true; - desc = "completion trigger/ forward in completen menu"; - }; - "uu" = { - action = '' - function() - local cmp = require('cmp'); - cmp.confirm() - end - ''; - lua = true; - desc = "confirm the selected item"; - }; - } - normal_and_insert; - normalVisualOp = { - # FIXME: Add the below keymappings, when alacritty gets support for the kitty - # keyboard protocol <2023-08-29> + keymaps = [ + { + mode = ["n" "i"]; + key = ""; + action = "noh"; + options.desc = "Disable the search highlighting and send Escape"; + } + { + key = "hh"; + mode = ["i"]; + action = '' + function() + local cmp = require('cmp'); + local luasnip = require('luasnip'); + + if cmp.visible() then + cmp.select_next_item() + elseif luasnip.expand_or_locally_jumpable() then + luasnip.expand_or_jump() + end + end + ''; + lua = true; + options.desc = "completion trigger/ forward in completen menu"; + } + { + key = "uu"; + mode = ["i"]; + action = '' + function() + local cmp = require('cmp'); + cmp.confirm() + end + ''; + lua = true; + options.desc = "confirm the selected item"; + } + # FIXME: Add the below keymappings, when alacritty gets support for the kitty + # keyboard protocol <2023-08-29> + { # "" - "ztn" = { - action = "tabnext"; - desc = "cycle to the next tab"; - }; + key = "ztn"; + action = "tabnext"; + options.desc = "cycle to the next tab"; + } + { # "" - "ztp" = { - action = "tabprevious"; - desc = "cycle to the previous tab"; - }; + key = "ztp"; + action = "tabprevious"; + options.desc = "cycle to the previous tab"; + } - # yank/ cut to the system clipboard - "y" = { - action = "\"+y"; - desc = "yank to the system clipboard"; - }; - "Y" = { - action = "\"+Y"; - desc = "yank until the end of the line to the system clipboard"; - }; + # yank/ cut to the system clipboard + { + key = "y"; + action = "\"+y"; + options.desc = "yank to the system clipboard"; + } + { + key = "Y"; + action = "\"+Y"; + options.desc = "yank until the end of the line to the system clipboard"; + } - # Unmap some old keys - #"s" = "''"; - #"t" = "''"; - "" = ""; - "" = ""; - "" = ""; - "" = ""; - - # Center the cursor vertically when moving to the next word during a search. - "l" = { - action = "nzzzv"; - desc = "Center the cursor vertically when moving to the next word during a - search."; - }; - "L" = { - action = "Nzzzv"; - desc = "Center the cursor vertically when moving to the next word during a - search."; - }; - # remap the other keys to dvorak - "k" = { - action = "t"; - desc = "go the the right on char"; - }; - "K" = { - action = "T"; - desc = "go to the left on char"; - }; - "j" = { - action = "k"; - desc = "go to the right before the char"; - }; - "J" = { - action = "K"; - desc = "go to the left before the char"; - }; + # Unmap some old keys + #{key = "s"; action = "''";} + #{key = "t"; action = "''";} + { + key = ""; + action = ""; + } + { + key = ""; + action = ""; + } + { + key = ""; + action = ""; + } + { + key = ""; + action = ""; + } - # Change Vim-keys - "h" = { - action = ""; - desc = "go left"; - }; - "t" = { - action = "g"; - desc = "go down, with displaylines"; - }; - "n" = { - action = "g"; - desc = "go up, with displaylines"; - }; - "s" = { - action = ""; - desc = "go right"; - }; + # Center the cursor vertically when moving to the next word during a search. + { + key = "l"; + action = "nzzzv"; + options.desc = "Center the cursor vertically when moving to the next word during a search."; + } + { + key = "L"; + action = "Nzzzv"; + options.desc = "Center the cursor vertically when moving to the next word during a search."; + } + # remap the other keys to dvorak + { + key = "k"; + action = "t"; + options.desc = "go the the right on char"; + } + { + key = "K"; + action = "T"; + options.desc = "go to the left on char"; + } + { + key = "j"; + action = "k"; + options.desc = "go to the right before the char"; + } + { + key = "J"; + action = "K"; + options.desc = "go to the left before the char"; + } - # Move display lines - "0" = { - action = "g0"; - desc = "go to the leftmost character in the screen line"; - }; - "$" = { - action = "g$"; - desc = "go to the rightmost character in the screen line"; - }; - }; - normal = - lib.recursiveUpdate { - "" = { - action = "gf"; - desc = "open file/url under cursor"; - }; - "" = { - action = ":"; - desc = "jump to command line"; - }; - - "\\f" = { - action = "function() require('lf').start() end"; - lua = true; - desc = "open lf in a floating window"; - }; - - # Splits - "" = { - action = "p"; - desc = "go to previous split"; - }; - "" = { - action = "w"; - desc = "go to next split"; - }; - "-" = { - action = "s"; - desc = "New horizontal split"; - }; - "|" = { - action = "v"; - desc = "New vertical split"; - }; - - # Exit insert mode after creating a new line above or below the current line."; - "o" = { - action = "o"; - desc = "add new line below"; - }; - "O" = { - action = "O"; - desc = "add new line above"; - }; - - "p" = { - action = "\"_dP"; - desc = "keep the cut thing in the base register"; - }; - "c" = { - action = "\"_c"; - desc = "change without saving to register"; - }; - - "d" = { - action = "\"_d"; - desc = "delete without saving to register"; - }; - "dd" = { - action = '' - function() - if vim.api.nvim_get_current_line():match("^%s*$") then - return '"_dd' - else - return "dd" - end - end - ''; - lua = true; - desc = "Pipe all blank line deletions to the blackhole register"; - expr = true; - silent = true; - }; - - "s" = { - action = ":%s/\\<\\>//gI"; - desc = "replace for the word under the cursor"; - }; - - "" = { - action = "mksession! "; - desc = "overwrite/create a session"; - }; - - "X" = { - action = "!!$SHELL "; - desc = "Read the current line and execute that line in your $SHELL. The resulting output will replace the curent line that was being executed."; - }; - } - normal_and_insert; - terminal = { - "" = { - action = ""; - desc = "Exit terminal mode with "; - }; - }; - visual = { - # move selected lines in visual mode - "T" = { - action = ":m '>+1gv=gv"; - desc = "move selected lines in visual mode down"; - }; - "N" = { - action = ":m '<-2gv=gv"; - desc = "move selected lines in visual mode up"; + # Change Vim-keys + { + key = "h"; + action = ""; + options.desc = "go left"; + } + { + key = "t"; + action = "g"; + options.desc = "go down, with displaylines"; + } + { + key = "n"; + action = "g"; + options.desc = "go up, with displaylines"; + } + { + key = "s"; + action = ""; + options.desc = "go right"; + } + + # Move display lines + { + key = "0"; + action = "g0"; + options.desc = "go to the leftmost character in the screen line"; + } + { + key = "$"; + action = "g$"; + options.desc = "go to the rightmost character in the screen line"; + } + { + mode = ["n"]; + key = ""; + action = "gf"; + options.desc = "open file/url under cursor"; + } + { + mode = ["n"]; + key = ""; + action = ":"; + options.desc = "jump to command line"; + } + + { + mode = ["n"]; + key = "\\f"; + action = "function() require('lf').start() end"; + lua = true; + options.desc = "open lf in a floating window"; + } + + # Splits + { + mode = ["n"]; + key = ""; + action = "p"; + options.desc = "go to previous split"; + } + { + mode = ["n"]; + key = ""; + action = "w"; + options.desc = "go to next split"; + } + { + mode = ["n"]; + key = "-"; + action = "s"; + options.desc = "New horizontal split"; + } + { + mode = ["n"]; + key = "|"; + action = "v"; + options.desc = "New vertical split"; + } + + # Exit insert mode after creating a new line above or below the current line."; + { + mode = ["n"]; + key = "o"; + action = "o"; + options.desc = "add new line below"; + } + { + mode = ["n"]; + key = "O"; + action = "O"; + options.desc = "add new line above"; + } + + { + mode = ["n"]; + key = "p"; + action = "\"_dP"; + options.desc = "keep the cut thing in the base register"; + } + { + mode = ["n"]; + key = "c"; + action = "\"_c"; + options.desc = "change without saving to register"; + } + + { + mode = ["n"]; + key = "d"; + action = "\"_d"; + options.desc = "delete without saving to register"; + } + { + key = "dd"; + mode = ["n"]; + action = '' + function() + if vim.api.nvim_get_current_line():match("^%s*$") then + return '"_dd' + else + return "dd" + end + end + ''; + lua = true; + options = { + desc = "Pipe all blank line deletions to the blackhole register"; + expr = true; + silent = true; }; - }; - }; + } + + { + mode = ["n"]; + key = "s"; + action = ":%s/\\<\\>//gI"; + options.desc = "replace for the word under the cursor"; + } + + { + mode = ["n"]; + key = ""; + action = "mksession! "; + options.desc = "overwrite/create a session"; + } + + { + mode = ["n"]; + key = "X"; + action = "!!$SHELL "; + options.desc = "Read the current line and execute that line in your $SHELL. The resulting output will replace the curent line that was being executed."; + } + { + mode = ["t"]; + key = ""; + action = ""; + options.desc = "Exit terminal mode with "; + } + + # move selected lines in visual mode + { + mode = ["v"]; + key = "T"; + action = ":m '>+1gv=gv"; + options.desc = "move selected lines in visual mode down"; + } + { + mode = ["v"]; + key = "N"; + action = ":m '<-2gv=gv"; + options.desc = "move selected lines in visual mode up"; + } + ]; }; } diff --git a/hm/soispha/conf/nvim/plgs/comment-nvim/default.nix b/hm/soispha/conf/nvim/plgs/comment-nvim/default.nix index cf99d3d5..b0d405f3 100644 --- a/hm/soispha/conf/nvim/plgs/comment-nvim/default.nix +++ b/hm/soispha/conf/nvim/plgs/comment-nvim/default.nix @@ -10,27 +10,31 @@ extra = false; }; }; - maps = { - visual = { - "gcc" = { - action = "(comment_toggle_linewise_visual)"; - desc = "toggle the current line in a linewise comment"; - }; - "gbc" = { - action = "(comment_toggle_blockwise_visual)"; - desc = "toggle the current line in a blockwise comment"; - }; - }; - normal = { - "gcc" = { - action = "(comment_toggle_linewise_current)"; - desc = "toggle the current line in a linewise comment"; - }; - "gbc" = { - action = "(comment_toggle_blockwise_current)"; - desc = "toggle the current line in a blockwise comment"; - }; - }; - }; + keymaps = [ + { + key = "gcc"; + mode = "v"; + action = "(comment_toggle_linewise_visual)"; + options.desc = "toggle the current line in a linewise comment"; + } + { + key = "gbc"; + mode = "v"; + action = "(comment_toggle_blockwise_visual)"; + options.desc = "toggle the current line in a blockwise comment"; + } + { + key = "gcc"; + mode = "n"; + action = "(comment_toggle_linewise_current)"; + options.desc = "toggle the current line in a linewise comment"; + } + { + key = "gbc"; + mode = "n"; + action = "(comment_toggle_blockwise_current)"; + options.desc = "toggle the current line in a blockwise comment"; + } + ]; }; } diff --git a/hm/soispha/conf/nvim/plgs/debugprint/default.nix b/hm/soispha/conf/nvim/plgs/debugprint/default.nix index 522965ac..b0d72339 100644 --- a/hm/soispha/conf/nvim/plgs/debugprint/default.nix +++ b/hm/soispha/conf/nvim/plgs/debugprint/default.nix @@ -12,66 +12,63 @@ pkgs.vimExtraPlugins.debugprint-nvim ]; - maps = let - visualNormal = { - "g?v" = { - action = '' - function() - return require('debugprint').debugprint({variable = true;}); - end - ''; - lua = true; - expr = true; - desc = '' - 'variable' debug line below the current line - ''; - }; - "g?V" = { - action = '' - function() - return require('debugprint').debugprint({above = true; variable = true;}) ; - end - ''; - lua = true; - expr = true; - desc = '' - 'variable' debug line above the current line - ''; - }; - }; - in { - normal = - { - "g?p" = { - action = '' - function() - return require('debugprint').debugprint(); - end - ''; - lua = true; - expr = true; - desc = '' - 'plain' debug line below the current line - ''; - }; - "g?P" = { - action = '' - function() - return require('debugprint').debugprint({above = true;}); - end - ''; - lua = true; - expr = true; - desc = '' - 'plain' debug line above the current line - ''; - }; - } - // visualNormal; - visual = - { - } - // visualNormal; - }; + keymaps = [ + { + key = "g?v"; + mode = ["v" "n"]; + action = '' + function() + return require('debugprint').debugprint({variable = true;}); + end + ''; + lua = true; + options.expr = true; + options.desc = '' + 'variable' debug line below the current line + ''; + } + { + key = "g?V"; + mode = ["v" "n"]; + action = '' + function() + return require('debugprint').debugprint({above = true; variable = true;}) ; + end + ''; + lua = true; + options.expr = true; + options.desc = '' + 'variable' debug line above the current line + ''; + } + { + key = "g?p"; + mode = "n"; + action = '' + function() + return require('debugprint').debugprint(); + end + ''; + lua = true; + options.expr = true; + options.desc = '' + 'plain' debug line below the current line + ''; + } + { + key = "g?P"; + mode = "n"; + action = '' + function() + return require('debugprint').debugprint({above = true;}); + end + ''; + lua = true; + options.expr = true; + options.desc = '' + 'plain' debug line above the current line + ''; + } + ]; }; } diff --git a/hm/soispha/conf/nvim/plgs/femaco/default.nix b/hm/soispha/conf/nvim/plgs/femaco/default.nix index 570ff297..be8723ce 100644 --- a/hm/soispha/conf/nvim/plgs/femaco/default.nix +++ b/hm/soispha/conf/nvim/plgs/femaco/default.nix @@ -11,14 +11,14 @@ extraPlugins = [ pkgs.vimExtraPlugins.nvim-FeMaco-lua ]; - maps = { - normal = { - "cc" = { - action = "require('femaco.edit').edit_code_block"; - lua = true; - desc = "edit a [c]ode blo[c]k with femaco"; - }; - }; - }; + keymaps = [ + { + key = "cc"; + mode = "n"; + action = "require('femaco.edit').edit_code_block"; + lua = true; + options.desc = "edit a [c]ode blo[c]k with femaco"; + } + ]; }; } diff --git a/hm/soispha/conf/nvim/plgs/goto-preview/default.nix b/hm/soispha/conf/nvim/plgs/goto-preview/default.nix index 740bb04c..70527b93 100644 --- a/hm/soispha/conf/nvim/plgs/goto-preview/default.nix +++ b/hm/soispha/conf/nvim/plgs/goto-preview/default.nix @@ -11,32 +11,42 @@ extraPlugins = [ pkgs.vimExtraPlugins.goto-preview ]; - maps.normal = { - "gd" = { + keymaps = [ + { + key = "gd"; + mode = "n"; action = "require('goto-preview').goto_preview_definition"; lua = true; - desc = "[G]oto [D]efinition"; - }; - "gtd" = { + options.desc = "[G]oto [D]efinition"; + } + { + key = "gtd"; + mode = "n"; action = "require('goto-preview').goto_preview_type_definition"; lua = true; - desc = "[G]oto the [t]ype [D]efinition"; - }; - "gi" = { + options.desc = "[G]oto the [t]ype [D]efinition"; + } + { + key = "gi"; + mode = "n"; action = "require('goto-preview').goto_preview_implementation"; lua = true; - desc = "[G]oto [I]mplementations"; - }; - "gr" = { + options.desc = "[G]oto [I]mplementations"; + } + { + key = "gr"; + mode = "n"; action = "require('goto-preview').goto_preview_references"; lua = true; - desc = "[G]o to all [R]eferences of the symbol"; - }; - "\\" = { + options.desc = "[G]o to all [R]eferences of the symbol"; + } + { + key = "\\"; + mode = "n"; action = "require('goto-preview').close_all_win"; lua = true; - desc = "close all preview windows"; - }; - }; + options.desc = "close all preview windows"; + } + ]; }; } diff --git a/hm/soispha/conf/nvim/plgs/harpoon/default.nix b/hm/soispha/conf/nvim/plgs/harpoon/default.nix index ecd1d6cb..76f33af8 100644 --- a/hm/soispha/conf/nvim/plgs/harpoon/default.nix +++ b/hm/soispha/conf/nvim/plgs/harpoon/default.nix @@ -6,16 +6,14 @@ number, desc_template, }: { - name = "${prefix}${number}"; - value = { - action = '' - function() - ${command_template number} - end - ''; - lua = true; - desc = "${desc_template number}"; - }; + key = "${prefix}${number}"; + action = '' + function() + ${command_template number} + end + ''; + lua = true; + options.desc = "${desc_template number}"; }; mkGotoTerminalCommand = number: let desc_template = number: "Goto terminal number ${number}"; @@ -30,8 +28,8 @@ in mkNumberedCommand {inherit desc_template command_template prefix number;}; - gotoTerminalMappings = builtins.listToAttrs (builtins.map mkGotoTerminalCommand numbers); - gotoFileMappings = builtins.listToAttrs (builtins.map mkGotoFileCommand numbers); + gotoTerminalMappings = builtins.map mkGotoTerminalCommand numbers; + gotoFileMappings = builtins.map mkGotoFileCommand numbers; in { programs.nixvim = { plugins.harpoon = { @@ -41,55 +39,60 @@ in { tmuxGotoTerminal = null; # TODO: }; }; - maps.normalVisualOp = - { - "-" = { + keymaps = + [ + { + key = "-"; action = '' function() require("harpoon.ui").nav_next() end ''; lua = true; - desc = "go to the next marked file"; - }; - "_" = { + options.desc = "go to the next marked file"; + } + { + key = "_"; action = '' function() require("harpoon.ui").nav_prev() end ''; lua = true; - desc = "go to the previous marked file"; - }; - "" = { + options.desc = "go to the previous marked file"; + } + { + key = ""; action = '' function() require("harpoon.mark").add_file() end ''; lua = true; - desc = "add a mark to the open file in harpoon."; - }; - "gqc" = { + options.desc = "add a mark to the open file in harpoon."; + } + { + key = "gqc"; action = '' function() require("harpoon.cmd-ui").toggle_quick_menu() end ''; lua = true; - desc = "toggle the harpoon command quick menu to see all commands."; - }; - "q" = { + options.desc = "toggle the harpoon command quick menu to see all commands."; + } + { + key = "q"; action = '' function() require("harpoon.ui").toggle_quick_menu() end ''; lua = true; - desc = "toggle the harpoon normal quick menu to see all marks."; - }; - } - // gotoFileMappings - // gotoTerminalMappings; + options.desc = "toggle the harpoon normal quick menu to see all marks."; + } + ] + ++ gotoFileMappings + ++ gotoTerminalMappings; }; } diff --git a/hm/soispha/conf/nvim/plgs/leap/default.nix b/hm/soispha/conf/nvim/plgs/leap/default.nix index bffdf33c..568dcec0 100644 --- a/hm/soispha/conf/nvim/plgs/leap/default.nix +++ b/hm/soispha/conf/nvim/plgs/leap/default.nix @@ -26,33 +26,34 @@ "Z" ]; }; - maps = { - normalVisualOp = { - "m" = { - action = "(leap-forward-to)"; - desc = "leap forward to"; - }; - "M" = { - action = "(leap-backward-to)"; - desc = "leap backward to"; - }; - "gs" = { - action = "(leap-from-window)"; - desc = "leap to enterable windows"; - }; - }; - visual = { - /* - "x" = { - action = "(leap-forward-till)"; - desc = "leap forward till"; - }; - "X" = { - action = "(leap-backward-till)"; - desc = "leap backward till"; - }; - */ - }; - }; + keymaps = [ + { + key = "m"; + action = "(leap-forward-to)"; + options.desc = "leap forward to"; + } + { + key = "M"; + action = "(leap-backward-to)"; + options.desc = "leap backward to"; + } + { + key = "gs"; + action = "(leap-from-window)"; + options.desc = "leap to enterable windows"; + } + /* + {key= "x"; + mode = "v"; + action = "(leap-forward-till)"; + options.desc = "leap forward till"; + } + {key= "X"; + mode = "v"; + action = "(leap-backward-till)"; + options.desc = "leap backward till"; + } + */ + ]; }; } diff --git a/hm/soispha/conf/nvim/plgs/lsp/keymaps/default.nix b/hm/soispha/conf/nvim/plgs/lsp/keymaps/default.nix index 4017521d..e176461e 100644 --- a/hm/soispha/conf/nvim/plgs/lsp/keymaps/default.nix +++ b/hm/soispha/conf/nvim/plgs/lsp/keymaps/default.nix @@ -50,23 +50,23 @@ }; }; }; - maps = { - normal = { - "f" = { - action = "function() vim.lsp.buf.format { async = true } end"; - lua = true; - desc = "[F]ormat the current buffer (asynchronously)"; - }; - "wl" = { - action = '' - function() - print(vim.inspect(vim.lsp.buf.list_workspace_folders())) - end - ''; - lua = true; - desc = "[W]orkspace folders [l]ist"; - }; - }; - }; + keymaps = [ + { + key = "f"; + action = "function() vim.lsp.buf.format { async = true } end"; + lua = true; + options.desc = "[F]ormat the current buffer (asynchronously)"; + } + { + key = "wl"; + action = '' + function() + print(vim.inspect(vim.lsp.buf.list_workspace_folders())) + end + ''; + lua = true; + options.desc = "[W]orkspace folders [l]ist"; + } + ]; }; } diff --git a/hm/soispha/conf/nvim/plgs/telescope/extensions/bibtex/default.nix b/hm/soispha/conf/nvim/plgs/telescope/extensions/bibtex/default.nix index 12c9736c..946d32f1 100644 --- a/hm/soispha/conf/nvim/plgs/telescope/extensions/bibtex/default.nix +++ b/hm/soispha/conf/nvim/plgs/telescope/extensions/bibtex/default.nix @@ -4,10 +4,12 @@ extraPlugins = [ pkgs.vimExtraPlugins.telescope-bibtex-nvim ]; - maps.normal = { - "ib" = { - desc = "[i]nsert a [b]atex citation"; - }; - }; + keymaps = [ + { + key = "ib"; + mode = "n"; + options.desc = "[i]nsert a [b]atex citation"; + } + ]; }; } diff --git a/hm/soispha/conf/nvim/plgs/telescope/extensions/frecency/default.nix b/hm/soispha/conf/nvim/plgs/telescope/extensions/frecency/default.nix index 4a4c22be..b236f3c5 100644 --- a/hm/soispha/conf/nvim/plgs/telescope/extensions/frecency/default.nix +++ b/hm/soispha/conf/nvim/plgs/telescope/extensions/frecency/default.nix @@ -1,14 +1,14 @@ {...}: { programs.nixvim = { - maps = { - normal = { - "gff" = { - action = "function() require('telescope').extensions.frecency.frecency() end"; - lua = true; - desc = "activate the frecency file selection"; - }; - }; - }; + keymaps = [ + { + key = "gff"; + mode = "n"; + action = "function() require('telescope').extensions.frecency.frecency() end"; + lua = true; + options.desc = "activate the frecency file selection"; + } + ]; plugins.telescope = { extensions.frecency = { enable = true; diff --git a/hm/soispha/conf/nvim/plgs/telescope/extensions/symbols/default.nix b/hm/soispha/conf/nvim/plgs/telescope/extensions/symbols/default.nix index fe38f8c1..fa166c02 100644 --- a/hm/soispha/conf/nvim/plgs/telescope/extensions/symbols/default.nix +++ b/hm/soispha/conf/nvim/plgs/telescope/extensions/symbols/default.nix @@ -4,48 +4,52 @@ # Source of symbols for telescope symbols pkgs.vimPlugins.telescope-symbols-nvim ]; - maps = { - normal = { - "il" = { - action = '' - function() - require('telescope.builtin').symbols{ sources = { - 'latex' - }} - end - ''; - lua = true; - desc = "[i]nsert a [l]atex symbol"; - }; - "ie" = { - action = '' - function() - require('telescope.builtin').symbols{ sources = { - 'emoji', - }} - end - ''; - lua = true; - desc = "[i]nsert a [e]moji"; - }; - "is" = { - action = '' - function() - require('telescope.builtin').symbols{ sources = { - 'emoji', - 'gitmoji', - 'julia', - 'kaomoji', - 'latex', - 'math', - 'nerd', - }} - end - ''; - lua = true; - desc = "[i]nsert a [s]ymbol (like emojis)"; - }; - }; - }; + keymaps = [ + { + key = "il"; + mode = "n"; + action = '' + function() + require('telescope.builtin').symbols{ sources = { + 'latex' + }} + end + ''; + lua = true; + options.desc = "[i]nsert a [l]atex symbol"; + } + { + key = "ie"; + mode = "n"; + action = '' + function() + require('telescope.builtin').symbols{ sources = { + 'emoji', + }} + end + ''; + lua = true; + options.desc = "[i]nsert a [e]moji"; + } + { + key = "is"; + mode = "n"; + action = '' + function() + require('telescope.builtin').symbols{ sources = { + 'emoji', + 'gitmoji', + 'julia', + 'kaomoji', + 'latex', + 'math', + 'nerd', + }} + end + ''; + lua = true; + options.desc = "[i]nsert a [s]ymbol (like emojis)"; + } + ]; }; } diff --git a/hm/soispha/conf/taskwarrior/hooks/default.nix b/hm/soispha/conf/taskwarrior/hooks/default.nix index a1393d42..208397bc 100644 --- a/hm/soispha/conf/taskwarrior/hooks/default.nix +++ b/hm/soispha/conf/taskwarrior/hooks/default.nix @@ -25,7 +25,9 @@ mkProjectName = project: if builtins.hasAttr "subprojects" project - then lib.lists.flatten ([project.name] ++ (builtins.map mkProjectName + then + lib.lists.flatten ([project.name] + ++ (builtins.map mkProjectName (builtins.map (mkProject project) project.subprojects))) else [project.name]; projects = lib.lists.flatten (builtins.map mkProjectName (import ../projects {})); diff --git a/hm/soispha/conf/taskwarrior/taskd/user_id.nix b/hm/soispha/conf/taskwarrior/taskd/user_id.nix index ab2567e6..5d9eed51 100644 Binary files a/hm/soispha/conf/taskwarrior/taskd/user_id.nix and b/hm/soispha/conf/taskwarrior/taskd/user_id.nix differ diff --git a/sys/secrets/default.nix b/sys/secrets/default.nix index b7387b8b..86118d10 100644 --- a/sys/secrets/default.nix +++ b/sys/secrets/default.nix @@ -4,7 +4,6 @@ ... }: let inherit (config.networking) hostName; - # mkFakeSecret = secretName: { # name = secretName; # value = { -- cgit 1.4.1