diff --git a/lua/cfp/config.lua b/lua/cfp/config.lua deleted file mode 100644 index 77d1033..0000000 --- a/lua/cfp/config.lua +++ /dev/null @@ -1,24 +0,0 @@ -local M = {} - -local defaults = { - keymaps = { - copy_path = "cp", - copy_path_line = "cP", - copy_branch_url = "cb", - copy_branch_url_line = "cB", - copy_hash_url = "ch", - copy_hash_url_line = "cH", - }, -} - -local config = {} - -function M.setup(opts) - config = vim.tbl_deep_extend("force", defaults, opts or {}) -end - -function M.get() - return config -end - -return M diff --git a/lua/cfp/init.lua b/lua/cfp/init.lua index a7ba8e1..ce6b04e 100644 --- a/lua/cfp/init.lua +++ b/lua/cfp/init.lua @@ -1,5 +1,26 @@ local M = {} +local defaults = { + keymaps = { + copy_path = "cp", + copy_path_line = "cP", + copy_branch_url = "cb", + copy_branch_url_line = "cB", + copy_hash_url = "ch", + copy_hash_url_line = "cH", + }, +} + +local config = {} + +function M.setup(opts) + config = vim.tbl_deep_extend("force", defaults, opts or {}) +end + +function M.get() + return config +end + -- Get the current buffer's file path relative to the current working directory local function get_relative_path() local buf_path = vim.api.nvim_buf_get_name(0)