2023-03-01 10:26:58 +00:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
2023-11-07 00:50:27 +00:00
|
|
|
}: let
|
2024-04-19 19:28:07 +00:00
|
|
|
inherit (lib.modules) mkMerge mkIf;
|
2024-04-07 15:31:06 +00:00
|
|
|
inherit (lib.nvim.binds) mkBinding;
|
2024-02-17 21:28:12 +00:00
|
|
|
inherit (lib.nvim.lua) toLuaObject;
|
2023-11-07 00:50:27 +00:00
|
|
|
|
2023-03-01 10:26:58 +00:00
|
|
|
cfg = config.vim.notes.todo-comments;
|
2024-02-17 21:28:12 +00:00
|
|
|
self = import ./todo-comments.nix {inherit pkgs lib;};
|
2024-03-12 00:47:01 +00:00
|
|
|
inherit (self.options.vim.notes.todo-comments) mappings;
|
2023-03-01 10:26:58 +00:00
|
|
|
in {
|
2024-03-12 00:47:01 +00:00
|
|
|
config = mkIf cfg.enable {
|
|
|
|
vim = {
|
|
|
|
startPlugins = [
|
|
|
|
"todo-comments"
|
|
|
|
];
|
2023-03-01 10:26:58 +00:00
|
|
|
|
2024-03-12 00:47:01 +00:00
|
|
|
maps.normal = mkMerge [
|
|
|
|
(mkBinding cfg.mappings.quickFix ":TodoQuickFix<CR>" mappings.quickFix.description)
|
|
|
|
(mkIf config.vim.telescope.enable (mkBinding cfg.mappings.telescope ":TodoTelescope<CR>" mappings.telescope.description))
|
|
|
|
(mkIf config.vim.lsp.trouble.enable (mkBinding cfg.mappings.trouble ":TodoTrouble<CR>" mappings.trouble.description))
|
|
|
|
];
|
2023-03-01 10:26:58 +00:00
|
|
|
|
2024-03-12 00:47:01 +00:00
|
|
|
luaConfigRC.todo-comments = ''
|
2024-02-17 21:28:12 +00:00
|
|
|
require('todo-comments').setup(${toLuaObject cfg.setupOpts})
|
2024-03-12 00:47:01 +00:00
|
|
|
'';
|
|
|
|
};
|
2023-03-01 10:26:58 +00:00
|
|
|
};
|
|
|
|
}
|