mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-08 11:21:35 +00:00
treewide: begin restructuring the module tree
This commit is contained in:
parent
e1835f6c46
commit
7c730a78e5
254 changed files with 749 additions and 664 deletions
31
modules/plugins/notes/todo-comments/config.nix
Normal file
31
modules/plugins/notes/todo-comments/config.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkMerge mkBinding mkIf;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
cfg = config.vim.notes.todo-comments;
|
||||
self = import ./todo-comments.nix {inherit pkgs lib;};
|
||||
inherit (self.options.vim.notes.todo-comments) mappings;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
vim = {
|
||||
startPlugins = [
|
||||
"todo-comments"
|
||||
];
|
||||
|
||||
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))
|
||||
];
|
||||
|
||||
luaConfigRC.todo-comments = ''
|
||||
require('todo-comments').setup(${toLuaObject cfg.setupOpts})
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue