modules/ui: switch to explicit lib calls

This commit is contained in:
raf 2024-03-16 16:25:30 +03:00
commit a7531186a8
No known key found for this signature in database
GPG key ID: 02D1DD3FA08B6B29
25 changed files with 251 additions and 272 deletions

View file

@ -3,14 +3,15 @@
lib,
...
}: let
inherit (lib) mkIf nvim;
inherit (lib.modules) mkIf;
inherit (lib.nvim.dag) entryAnywhere;
cfg = config.vim.ui.illuminate;
in {
config = mkIf cfg.enable {
vim.startPlugins = ["vim-illuminate"];
vim.luaConfigRC.vim-illuminate = nvim.dag.entryAnywhere ''
vim.luaConfigRC.vim-illuminate = entryAnywhere ''
require('illuminate').configure({
filetypes_denylist = {
'dirvish',

View file

@ -1,4 +1,4 @@
_: {
{
imports = [
./config.nix
./illuminate.nix

View file

@ -1,11 +1,7 @@
{
config,
lib,
...
}: let
inherit (lib) mkEnableOption;
{lib, ...}: let
inherit (lib.options) mkEnableOption;
in {
options.vim.ui.illuminate = {
enable = mkEnableOption "vim-illuminate: automatically highlight other uses of the word under the cursor";
enable = mkEnableOption "automatically highlight other uses of the word under the cursor [vim-illuminate]";
};
}