2023-03-01 11:26:58 +01:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
2023-11-07 01:50:27 +01:00
|
|
|
}: let
|
2024-04-19 21:28:07 +02:00
|
|
|
inherit (lib.modules) mkMerge mkIf;
|
2024-04-07 17:31:06 +02:00
|
|
|
inherit (lib.nvim.binds) mkBinding;
|
2024-02-17 22:28:12 +01:00
|
|
|
inherit (lib.nvim.lua) toLuaObject;
|
2023-11-07 01:50:27 +01:00
|
|
|
|
2023-03-01 11:26:58 +01:00
|
|
|
cfg = config.vim.notes.todo-comments;
|
2024-02-17 22:28:12 +01:00
|
|
|
self = import ./todo-comments.nix {inherit pkgs lib;};
|
2024-03-12 01:47:01 +01:00
|
|
|
inherit (self.options.vim.notes.todo-comments) mappings;
|
2023-03-01 11:26:58 +01:00
|
|
|
in {
|
2024-03-12 01:47:01 +01:00
|
|
|
config = mkIf cfg.enable {
|
|
|
|
vim = {
|
|
|
|
startPlugins = [
|
|
|
|
"todo-comments"
|
|
|
|
];
|
2023-03-01 11:26:58 +01:00
|
|
|
|
2024-03-12 01:47:01 +01: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 11:26:58 +01:00
|
|
|
|
2024-07-15 12:40:05 +02:00
|
|
|
pluginRC.todo-comments = ''
|
2024-02-17 22:28:12 +01:00
|
|
|
require('todo-comments').setup(${toLuaObject cfg.setupOpts})
|
2024-03-12 01:47:01 +01:00
|
|
|
'';
|
|
|
|
};
|
2023-03-01 11:26:58 +01:00
|
|
|
};
|
|
|
|
}
|