modules/neoformat: add possibility to overwrite base configs

This commit is contained in:
Dmitriy Pleshevskiy 2024-04-21 00:24:47 +03:00
parent 6030f1df18
commit 8933762c5c
Signed by: pleshevskiy
GPG key ID: 17041163DA10A9A2

View file

@ -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' ''