mirror of
https://github.com/nix-community/nixvim.git
synced 2025-08-18 16:29:07 +02:00
modules/highlights: fix mkIf
This commit is contained in:
parent
82fa648e04
commit
be4e083fd2
1 changed files with 12 additions and 10 deletions
|
@ -28,8 +28,8 @@ with lib;
|
|||
};
|
||||
};
|
||||
|
||||
config = mkIf (config.highlight != { }) {
|
||||
extraConfigLuaPost = ''
|
||||
config = mkIf (config.highlight != { } || config.matches != { }) {
|
||||
extraConfigLuaPost = (optionalString (config.highlight != { }) ''
|
||||
-- Highlight groups {{
|
||||
do
|
||||
local highlights = ${helpers.toLuaObject config.highlight}
|
||||
|
@ -39,7 +39,8 @@ with lib;
|
|||
end
|
||||
end
|
||||
-- }}
|
||||
|
||||
'') ++
|
||||
(optionalString (config.matches != { }) ''
|
||||
-- Match groups {{
|
||||
do
|
||||
local match = ${helpers.toLuaObject config.match}
|
||||
|
@ -49,6 +50,7 @@ with lib;
|
|||
end
|
||||
end
|
||||
-- }}
|
||||
'';
|
||||
'');
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue