nix-community.nixvim/plugins/by-name/hex/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

49 lines
1.1 KiB
Nix
Raw Normal View History

2025-04-07 23:36:00 +02:00
{ lib, ... }:
2024-09-09 14:14:53 +02:00
let
inherit (lib.nixvim) defaultNullOpts mkNullOrLuaFn;
in
2024-12-22 09:58:27 +00:00
lib.nixvim.plugins.mkNeovimPlugin {
2024-09-09 14:14:53 +02:00
name = "hex";
packPathName = "hex.nvim";
2024-09-09 14:14:53 +02:00
package = "hex-nvim";
maintainers = [ lib.maintainers.GaetanLepage ];
2025-04-07 23:36:00 +02:00
imports = [
# TODO: added 2025-04-07, remove after 25.05
(lib.nixvim.mkRemovedPackageOptionModule {
plugin = "hex";
packageName = "xxd";
})
];
2024-09-09 14:14:53 +02:00
2025-04-07 23:36:00 +02:00
extraConfig = {
dependencies.xxd.enable = lib.mkDefault true;
};
2024-09-09 14:14:53 +02:00
settingsOptions = {
dump_cmd = defaultNullOpts.mkStr "xxd -g 1 -u" ''
cli command used to dump hex data.
'';
assemble_cmd = defaultNullOpts.mkStr "xxd -r" ''
cli command used to dump hex data.
'';
is_buf_binary_pre_read = mkNullOrLuaFn ''
Function that runs on `BufReadPre` to determine if it's binary or not.
It should return a boolean value.
'';
is_buf_binary_post_read = mkNullOrLuaFn ''
Function that runs on `BufReadPost` to determine if it's binary or not.
It should return a boolean value.
'';
};
settingsExample = {
dump_cmd = "xxd -g 1 -u";
assemble_cmd = "xxd -r";
};
}