From fd89417d9189e1d93fecec12b1861f7e97fc3969 Mon Sep 17 00:00:00 2001 From: Hiroshi Muraoka Date: Fri, 22 Aug 2025 18:23:21 +0900 Subject: [PATCH] fix: export setup in init.lua Signed-off-by: Hiroshi Muraoka --- lua/cfp/config.lua | 24 ------------------------ lua/cfp/init.lua | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 24 deletions(-) delete mode 100644 lua/cfp/config.lua 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)