modules/neovim: avoid interpolating strings for vim.preventJunkFiles

This commit is contained in:
NotAShelf 2024-12-03 01:03:45 +03:00
parent 07f50e84eb
commit c19c925f1d
No known key found for this signature in database
GPG key ID: AF26552424E53993

View file

@ -95,9 +95,15 @@ in {
# and 'vim.globals' (vim.g). Future options, if possible, should be added here instead of the
# luaConfigRC section below.
options = pushDownDefault {
# Options that are always set, with a lower priority
encoding = "utf-8";
hidden = true;
expandtab = true;
# Junkfile Behaviour
swapfile = !cfg.preventJunkFiles;
backup = !cfg.preventJunkFiles;
writebackup = !cfg.preventJunkFiles;
};
# Options that are more difficult to set through 'vim.options'. Fear not, though
@ -111,12 +117,6 @@ in {
vim.o.undodir = ${toLuaObject cfg.undoFile.path}
''}
${optionalString cfg.preventJunkFiles ''
vim.o.swapfile = false
vim.o.backup = false
vim.o.writebackup = false
''}
${optionalString (cfg.bell == "none") ''
vim.o.errorbells = false
vim.o.visualbell = false