We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6a4da61 + b4957f5 commit af4714aCopy full SHA for af4714a
lua/gist/core/gh.lua
@@ -44,14 +44,14 @@ end
44
--
45
-- @return table A table with the configuration properties
46
function M.read_config()
47
- local ok, values = pcall(vim.api.nvim_get_var, { "gist_is_private", "gist_clipboard" })
48
-
49
- local is_private = ok and values[1] or false
50
- local clipboard = ok and values[2] or "+"
+ local ok_private, private = pcall(vim.api.nvim_get_var, "gist_is_private")
+ local is_private = ok_private and private or false
+ local ok_clipboard, clipboard = pcall(vim.api.nvim_get_var, "gist_clipboard")
+ local clipboard_reg = ok_clipboard and clipboard or "+"
51
52
local config = {
53
is_private = is_private,
54
- clipboard = clipboard,
+ clipboard = clipboard_reg,
55
}
56
57
return config
0 commit comments