mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-12-26 20:52:22 +00:00
modules/neovim: avoid interpolating strings for vim.preventJunkFiles
This commit is contained in:
parent
b01613568f
commit
5afcf67b82
1 changed files with 21 additions and 21 deletions
|
@ -95,78 +95,78 @@ 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
|
||||
# as the Lua DAG is still as powerful as it could be.
|
||||
luaConfigRC.basic = entryAfter ["globalsScript"] ''
|
||||
-- Settings that are set for everything
|
||||
vim.opt.shortmess:append("c")
|
||||
-- Settings that are set for everything
|
||||
vim.opt.shortmess:append("c")
|
||||
|
||||
${optionalString cfg.undoFile.enable ''
|
||||
${optionalString cfg.undoFile.enable ''
|
||||
vim.o.undofile = true
|
||||
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") ''
|
||||
${optionalString (cfg.bell == "none") ''
|
||||
vim.o.errorbells = false
|
||||
vim.o.visualbell = false
|
||||
''}
|
||||
|
||||
${optionalString (cfg.bell == "on") ''
|
||||
${optionalString (cfg.bell == "on") ''
|
||||
vim.o.visualbell = false
|
||||
''}
|
||||
|
||||
${optionalString (cfg.bell == "visual") ''
|
||||
${optionalString (cfg.bell == "visual") ''
|
||||
vim.o.errorbells = false
|
||||
''}
|
||||
|
||||
${optionalString (cfg.lineNumberMode == "relative") ''
|
||||
${optionalString (cfg.lineNumberMode == "relative") ''
|
||||
vim.o.relativenumber = true
|
||||
''}
|
||||
|
||||
${optionalString (cfg.lineNumberMode == "number") ''
|
||||
${optionalString (cfg.lineNumberMode == "number") ''
|
||||
vim.o.number = true
|
||||
''}
|
||||
|
||||
${optionalString (cfg.lineNumberMode == "relNumber") ''
|
||||
${optionalString (cfg.lineNumberMode == "relNumber") ''
|
||||
vim.o.number = true
|
||||
vim.o.relativenumber = true
|
||||
''}
|
||||
|
||||
${optionalString cfg.useSystemClipboard ''
|
||||
${optionalString cfg.useSystemClipboard ''
|
||||
vim.opt.clipboard:append("unnamedplus")
|
||||
''}
|
||||
|
||||
${optionalString cfg.syntaxHighlighting ''
|
||||
${optionalString cfg.syntaxHighlighting ''
|
||||
vim.cmd("syntax on")
|
||||
''}
|
||||
|
||||
${optionalString cfg.hideSearchHighlight ''
|
||||
${optionalString cfg.hideSearchHighlight ''
|
||||
vim.o.hlsearch = false
|
||||
vim.o.incsearch = true
|
||||
''}
|
||||
|
||||
${optionalString (cfg.searchCase == "ignore") ''
|
||||
${optionalString (cfg.searchCase == "ignore") ''
|
||||
vim.o.smartcase = false
|
||||
vim.o.ignorecase = true
|
||||
''}
|
||||
|
||||
${optionalString (cfg.searchCase == "smart") ''
|
||||
${optionalString (cfg.searchCase == "smart") ''
|
||||
vim.o.smartcase = true
|
||||
vim.o.ignorecase = true
|
||||
''}
|
||||
|
||||
${optionalString (cfg.searchCase == "sensitive") ''
|
||||
${optionalString (cfg.searchCase == "sensitive") ''
|
||||
vim.o.smartcase = false
|
||||
vim.o.ignorecase = false
|
||||
''}
|
||||
|
|
Loading…
Reference in a new issue