From bb05c664d78796b7d26969ccfd3bea6cc9131b03 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 10 Nov 2024 20:02:23 +0100 Subject: add keymap to open telescope in current buffer's dir --- lua/utility/misc.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'lua/utility/misc.lua') diff --git a/lua/utility/misc.lua b/lua/utility/misc.lua index 04ec1fc..5e0b08c 100644 --- a/lua/utility/misc.lua +++ b/lua/utility/misc.lua @@ -1,8 +1,7 @@ -function GetCurrentFile() - return vim.fn.expand("%") -end +local misc = {} -function Dirname(file_path) +function misc.dir_name(file_path) return vim.fn.fnamemodify(file_path, ":p:h") end +return misc -- cgit v1.2.3-18-g5258