Skip to content
This repository has been archived by the owner on Jan 7, 2024. It is now read-only.

Commit

Permalink
feat(config): Add default config extension
Browse files Browse the repository at this point in the history
  • Loading branch information
samodostal committed Feb 8, 2022
1 parent f365fc7 commit 0f4ab42
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
5 changes: 5 additions & 0 deletions lua/image/config.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
local M = {}

M.DEFAULT_OPTS = {}

return M
11 changes: 6 additions & 5 deletions lua/image/init.lua
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
local M = {}

function M.setup(config)
if not config then
config = {}
end
local config = require("config")

print("Image.nvim plugin set-up...")
function M.setup(opts)
opts = opts or {}
opts = vim.tbl_deep_extend("force", config.DEFAULT_OPTS, opts)

print("Image.nvim plugin set-up with opts: ", opts)
end

return M

0 comments on commit 0f4ab42

Please sign in to comment.