Fix option precedence buffer over global

This commit is contained in:
Marty Oehme 2021-04-30 16:45:48 +02:00
parent fdcb0f2a93
commit 3eccd67b21
Signed by: Marty
GPG Key ID: B7538B8F50A1C800
2 changed files with 1 additions and 2 deletions

View File

@ -1,5 +1,4 @@
local ls = {}
-- TODO rename to files.lua? since it's the only module interacting solely w/ the file system
local o = require 'zettelkasten.options'

View File

@ -45,7 +45,7 @@ local function get_options(defaults)
for opt, _ in pairs(def) do
-- check for vim options set (globally or buffer), otherwise use default value
options[opt] = vim.g[def[opt].vimname] or vim.b[def[opt].vimname] or
options[opt] = vim.b[def[opt].vimname] or vim.g[def[opt].vimname] or
def[opt].default
-- check correct option set for constrained value sets