diff options
author | Soispha <soispha@vhack.eu> | 2023-08-29 21:33:43 +0200 |
---|---|---|
committer | Soispha <soispha@vhack.eu> | 2023-08-29 21:33:43 +0200 |
commit | 3925f6ee04f09d7d09b7aff018812670a0e89492 (patch) | |
tree | 12642e7332ebb53153bef1bf5d5f811e3f19884b /hm/soispha/conf/nvim/plgs/debugprint/default.nix | |
parent | Feat(hm/conf/nvim/plgs/debugprint): Init (diff) | |
download | nixos-config-3925f6ee04f09d7d09b7aff018812670a0e89492.zip |
Refactor(hm/conf/nvim/plugins): Rename to `plgs` to safe commit msg space
Diffstat (limited to 'hm/soispha/conf/nvim/plgs/debugprint/default.nix')
-rw-r--r-- | hm/soispha/conf/nvim/plgs/debugprint/default.nix | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/hm/soispha/conf/nvim/plgs/debugprint/default.nix b/hm/soispha/conf/nvim/plgs/debugprint/default.nix new file mode 100644 index 00000000..522965ac --- /dev/null +++ b/hm/soispha/conf/nvim/plgs/debugprint/default.nix @@ -0,0 +1,77 @@ +{ + pkgs, + lib, + ... +}: { + programs.nixvim = { + # TODO: package debugprint though a module + extraConfigLuaPost = '' + ${lib.strings.fileContents ./lua/debugprint.lua} + ''; + extraPlugins = [ + 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; + }; + }; +} |