Skip to content

Commit

Permalink
fix: fixed settings and defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
rawnly committed Mar 14, 2023
1 parent 697fa02 commit 88fb508
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 4 additions & 2 deletions lua/gist/core/gh.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 0 additions & 3 deletions plugin/gist.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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")

0 comments on commit 88fb508

Please sign in to comment.