From 8933762c5c8e778750a9c90aabfd2258547e3f9a Mon Sep 17 00:00:00 2001 From: Dmitriy Pleshevskiy Date: Sun, 21 Apr 2024 00:24:47 +0300 Subject: [PATCH] modules/neoformat: add possibility to overwrite base configs --- modules/neoformat.nix | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/modules/neoformat.nix b/modules/neoformat.nix index d38a5d6..b18b198 100644 --- a/modules/neoformat.nix +++ b/modules/neoformat.nix @@ -11,14 +11,16 @@ }: let inherit (builtins) concatLists attrValues mapAttrs; in +let + baseConfigs = { + neoformat_try_node_exe = 1; + neoformat_only_msg_on_error = 1; + }; +in + { neoformat = concatLists [ - [ - (vim.g "neoformat_try_node_exe" 1) - (vim.g "neoformat_only_msg_on_error" 1) - ] - - (attrValues (mapAttrs vim.g configs)) + (attrValues (mapAttrs vim.g (baseConfigs // configs))) [ (vim.cmd' ''