diff --git a/lua/gist/core/gh.lua b/lua/gist/core/gh.lua index f15ebac..deb88ff 100644 --- a/lua/gist/core/gh.lua +++ b/lua/gist/core/gh.lua @@ -41,8 +41,10 @@ end --- Reads the configuration from the user's vimrc -- @treturn table A table with the configuration properties function M.read_config() - local is_private = vim.api.nvim_get_var("gist_is_private") or false - local clipboard = vim.api.nvim_get_var("gist_clipboard") or "+" + local ok, values = pcall(vim.api.nvim_get_var, { "gist_is_private", "gist_clipboard" }) + + local is_private = ok and values[1] or false + local clipboard = ok and values[2] or "xsel" local config = { is_private = is_private, diff --git a/plugin/gist.lua b/plugin/gist.lua index bd0ae92..b86c600 100644 --- a/plugin/gist.lua +++ b/plugin/gist.lua @@ -4,6 +4,3 @@ vim.api.nvim_create_user_command("CreateGist", gist.create, { bang = true, desc = "Create a new gist from curretn file", }) - --- vim.cmd("helptag -n gist doc/gist.txt") -vim.cmd("helptag doc")