diff options
Diffstat (limited to 'lua/denote-fzf-lua.lua')
| -rw-r--r-- | lua/denote-fzf-lua.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lua/denote-fzf-lua.lua b/lua/denote-fzf-lua.lua index 180de4a..d685ef9 100644 --- a/lua/denote-fzf-lua.lua +++ b/lua/denote-fzf-lua.lua @@ -30,7 +30,7 @@ function M.copy_table(table) return new_table end ----@param force_slow bool - If true, act as if we don't have dependencies +---@param force_slow boolean - If true, act as if we don't have dependencies ---Check for dependencies and optional dependencies function M.has_prereqs(force_slow) if vim.fn.executable('fzf') ~= 1 then return "no" end @@ -41,7 +41,7 @@ function M.has_prereqs(force_slow) return "yes" end ----@param force_slow bool - If true, act as if we don't have dependencies +---@param force_slow boolean - If true, act as if we don't have dependencies ---Sets the full path of the appropriate search script (regular or fallback) function M.set_script_path(force_slow) local lua_file_path = debug.getinfo(1, "S").source:sub(2) @@ -73,7 +73,7 @@ function M.format_fzf_with_nth(options) end ---@param f string - Field from search result ----@param delim delimiter character +---@param delim string delimiter character ---Puts a field from the search results back into Denote format (e.g. two words to --two-words) function M.repopulate_field(f, delim) if f == "." then @@ -83,9 +83,8 @@ function M.repopulate_field(f, delim) end end ----@param filename chopped up string with fields separated by multiple spaces +---@param filename string chopped up string with fields separated by multiple spaces function M.recombine_filename(filename) - vim.print(filename) local t = {} filename = filename:gsub("%s%s+", "|") t.path, t.year, t.month, t.day, t.hour, t.min, t.sec, t.sig, t.title, t.keywords, t.ext = @@ -107,6 +106,7 @@ function M.search_files(options) opts.fzf_opts["--with-nth"] = M.format_fzf_with_nth(options) opts.fzf_opts['--header-lines'] = 1 opts.fzf_opts['--delimiter'] = "\\s{2,}" + -- print(vim.inspect(opts)) opts.actions = { ['default'] = function(selected, opts) local filename = M.recombine_filename(selected[1]) |
