This commit is contained in:
sankalp committed 2025-01-19 14:43:34 +05:45
1 parent 7e1e99786c
commit 1af1f266a3
22 files changed
+408 -539

No files matched your search

+2
View File
@@ -33,6 +33,7 @@ return {
Repo = '',
Tag = '',
Untrack = '',
Directory = '',
},
kind = {
Class = '',
@@ -164,3 +165,4 @@ return {
Windows = '',
},
}
+15
View File
@@ -28,6 +28,20 @@ util.get_root_dir = function()
end
end
util.get_file_path = function()
local buf_name = vim.api.nvim_buf_get_name(0)
if vim.fn.filereadable(buf_name) == 1 then
return buf_name
end
local dir_name = vim.fn.fnamemodify(buf_name, ':p:h')
if vim.fn.isdirectory(dir_name) == 1 then
return dir_name
end
return vim.loop.cwd()
end
util.get_file_type_cmd = function(extension)
local root = util.get_root_dir()
@@ -64,3 +78,4 @@ util.telescope_select = function(options, options_desc, select_prompt)
end
return util