Skip to content

Commit 88fb508

Browse files
committed
fix: fixed settings and defaults
1 parent 697fa02 commit 88fb508

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

lua/gist/core/gh.lua

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@ end
4141
--- Reads the configuration from the user's vimrc
4242
-- @treturn table A table with the configuration properties
4343
function M.read_config()
44-
local is_private = vim.api.nvim_get_var("gist_is_private") or false
45-
local clipboard = vim.api.nvim_get_var("gist_clipboard") or "+"
44+
local ok, values = pcall(vim.api.nvim_get_var, { "gist_is_private", "gist_clipboard" })
45+
46+
local is_private = ok and values[1] or false
47+
local clipboard = ok and values[2] or "xsel"
4648

4749
local config = {
4850
is_private = is_private,

plugin/gist.lua

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,3 @@ vim.api.nvim_create_user_command("CreateGist", gist.create, {
44
bang = true,
55
desc = "Create a new gist from curretn file",
66
})
7-
8-
-- vim.cmd("helptag -n gist doc/gist.txt")
9-
vim.cmd("helptag doc")

0 commit comments

Comments
 (0)