Fix option precedence buffer over global
This commit is contained in:
parent
fdcb0f2a93
commit
3eccd67b21
2 changed files with 1 additions and 2 deletions
|
@ -1,5 +1,4 @@
|
||||||
local ls = {}
|
local ls = {}
|
||||||
-- TODO rename to files.lua? since it's the only module interacting solely w/ the file system
|
|
||||||
|
|
||||||
local o = require 'zettelkasten.options'
|
local o = require 'zettelkasten.options'
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ local function get_options(defaults)
|
||||||
for opt, _ in pairs(def) do
|
for opt, _ in pairs(def) do
|
||||||
|
|
||||||
-- check for vim options set (globally or buffer), otherwise use default value
|
-- 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
|
def[opt].default
|
||||||
|
|
||||||
-- check correct option set for constrained value sets
|
-- check correct option set for constrained value sets
|
||||||
|
|
Loading…
Reference in a new issue