diff --git a/modules/home/programs/terminal/editors/neovim/plugins/ccc.nix b/modules/home/programs/terminal/editors/neovim/plugins/ccc.nix index ece0fa6b5..cafb01414 100644 --- a/modules/home/programs/terminal/editors/neovim/plugins/ccc.nix +++ b/modules/home/programs/terminal/editors/neovim/plugins/ccc.nix @@ -12,9 +12,13 @@ _: { filetypes = [ "colorPickerFts" ]; }; pickers = [ + # Lua ''require("ccc").picker.hex'' + # Lua ''require("ccc").picker.css_rgb'' + # Lua ''require("ccc").picker.css_hsl'' + # Lua '' require("ccc").picker.ansi_escape { meaning1 = "bright" @@ -26,28 +30,40 @@ _: { }; inputs = [ "require('ccc').input.hsl" ]; outputs = [ + # Lua "require('ccc').output.css_hsl" + # Lua "require('ccc').output.css_rgb" + # Lua "require('ccc').output.hex" ]; convert = [ [ + # Lua "require('ccc').picker.hex" + # Lua "require('ccc').output.css_hsl" ] [ + # Lua "require('ccc').picker.css_rgb" + # Lua "require('ccc').output.css_hsl" ] [ + # Lua "require('ccc').picker.css_hsl" + # Lua "require('ccc').output.hex" ] ]; mappings = { - "q".__raw = "require('ccc').mapping.quit"; - "L".__raw = "require('ccc').mapping.increase10"; - "H".__raw = "require('ccc').mapping.decrease10"; + q.__raw = # Lua + "require('ccc').mapping.quit"; + L.__raw = # Lua + "require('ccc').mapping.increase10"; + H.__raw = # Lua + "require('ccc').mapping.decrease10"; }; }; }; diff --git a/modules/home/programs/terminal/editors/neovim/plugins/gitsigns.nix b/modules/home/programs/terminal/editors/neovim/plugins/gitsigns.nix index 4d7599221..045fe7c2e 100644 --- a/modules/home/programs/terminal/editors/neovim/plugins/gitsigns.nix +++ b/modules/home/programs/terminal/editors/neovim/plugins/gitsigns.nix @@ -107,15 +107,16 @@ in { mode = "n"; key = "ghp"; - action.__raw = '' - function() - if vim.wo.diff then return ${toJSON "gp"} end + action.__raw = # Lua + '' + function() + if vim.wo.diff then return ${toJSON "gp"} end - vim.schedule(function() require("gitsigns").prev_hunk() end) + vim.schedule(function() require("gitsigns").prev_hunk() end) - return '' - end - ''; + return '' + end + ''; options = { desc = "Previous hunk"; silent = true; @@ -124,15 +125,16 @@ in { mode = "n"; key = "ghn"; - action.__raw = '' - function() - if vim.wo.diff then return ${toJSON "gn"} end + action.__raw = # Lua + '' + function() + if vim.wo.diff then return ${toJSON "gn"} end - vim.schedule(function() require("gitsigns").next_hunk() end) + vim.schedule(function() require("gitsigns").next_hunk() end) - return '' - end - ''; + return '' + end + ''; options = { desc = "Next hunk"; silent = true; diff --git a/modules/home/programs/terminal/editors/neovim/plugins/hop.nix b/modules/home/programs/terminal/editors/neovim/plugins/hop.nix index 8dcbb6c0e..f19879503 100644 --- a/modules/home/programs/terminal/editors/neovim/plugins/hop.nix +++ b/modules/home/programs/terminal/editors/neovim/plugins/hop.nix @@ -10,48 +10,52 @@ keymaps = lib.optionals config.programs.nixvim.plugins.hop.enable [ { key = "f"; - action.__raw = '' - function() - require'hop'.hint_char1({ - direction = require'hop.hint'.HintDirection.AFTER_CURSOR, - }) - end - ''; + action.__raw = # Lua + '' + function() + require'hop'.hint_char1({ + direction = require'hop.hint'.HintDirection.AFTER_CURSOR, + }) + end + ''; options.remap = true; } { key = "F"; - action.__raw = '' - function() - require'hop'.hint_char1({ - direction = require'hop.hint'.HintDirection.BEFORE_CURSOR, - }) - end - ''; + action.__raw = # Lua + '' + function() + require'hop'.hint_char1({ + direction = require'hop.hint'.HintDirection.BEFORE_CURSOR, + }) + end + ''; options.remap = true; } { key = "t"; - action.__raw = '' - function() - require'hop'.hint_char1({ - direction = require'hop.hint'.HintDirection.AFTER_CURSOR, - hint_offset = -1 - }) - end - ''; + action.__raw = # Lua + '' + function() + require'hop'.hint_char1({ + direction = require'hop.hint'.HintDirection.AFTER_CURSOR, + hint_offset = -1 + }) + end + ''; options.remap = true; } { key = "T"; - action.__raw = '' - function() - require'hop'.hint_char1({ - direction = require'hop.hint'.HintDirection.BEFORE_CURSOR, - hint_offset = 1 - }) - end - ''; + action.__raw = # Lua + '' + function() + require'hop'.hint_char1({ + direction = require'hop.hint'.HintDirection.BEFORE_CURSOR, + hint_offset = 1 + }) + end + ''; options.remap = true; } ];