diff --git a/lua/fzf-lua-overlay/config.lua b/lua/fzf-lua-overlay/config.lua index ba27fba..747843b 100644 --- a/lua/fzf-lua-overlay/config.lua +++ b/lua/fzf-lua-overlay/config.lua @@ -2,11 +2,10 @@ local M = {} M.opts = { dot_dir = '~', - dot_dirs = { '~' }, note_dir = '~/notes', todo_dir = '~/notes/todo/', snip_dir = '~/notes/snip/', - cache_dir = vim.fs.joinpath(vim.g.cache_dir or vim.fn.stdpath 'cache', 'fzf-lua-overlay'), + cache_dir = vim.fs.joinpath(vim.g.state_path or vim.fn.stdpath 'state', 'fzf-lua-overlay'), } M.setup = function(opts) M.opts = vim.tbl_deep_extend('force', M.opts, opts or {}) end diff --git a/lua/fzf-lua-overlay/providers/find_dots.lua b/lua/fzf-lua-overlay/providers/find_dots.lua index f68b130..33bbefe 100644 --- a/lua/fzf-lua-overlay/providers/find_dots.lua +++ b/lua/fzf-lua-overlay/providers/find_dots.lua @@ -11,7 +11,7 @@ M.opts = { formatter = 'path.filename_first', cwd = cfg.dot_dir, cmd = ([[rg --color=never --files --hidden %s --follow --no-messages -g "!.git"]]):format( - table.concat(cfg.dot_dirs, ' ') + table.concat({ cfg.dot_dir }, ' ') ), } diff --git a/lua/fzf-lua-overlay/providers/grep_dots.lua b/lua/fzf-lua-overlay/providers/grep_dots.lua index ee53708..2c79a85 100644 --- a/lua/fzf-lua-overlay/providers/grep_dots.lua +++ b/lua/fzf-lua-overlay/providers/grep_dots.lua @@ -10,7 +10,7 @@ M.opts = { prompt = 'grep_dots> ', cwd = cfg.dot_dir, cmd = ([[rg %s --column --line-number --no-heading --color=always --smart-case --max-columns=4096 -e]]):format( - table.concat(cfg.dot_dirs, ' ') + table.concat({ cfg.dot_dir }, ' ') ), } diff --git a/lua/fzf-lua-overlay/providers/grep_notes.lua b/lua/fzf-lua-overlay/providers/grep_notes.lua index fd259fb..fc4032a 100644 --- a/lua/fzf-lua-overlay/providers/grep_notes.lua +++ b/lua/fzf-lua-overlay/providers/grep_notes.lua @@ -1,7 +1,5 @@ local cfg = require('fzf-lua-overlay.config').opts -local notes_history = vim.fs.joinpath(cfg.cache_dir, 'notes_history') - local M = {} M.name = 'live_grep_native' @@ -11,10 +9,9 @@ M.opts = { actions = { ['ctrl-g'] = function() local last_query = require('fzf-lua').get_last_query() - return require('fzf-lua-overlay').find_notes({ query = last_query }) + return require('fzf-lua-overlay').find_notes { query = last_query } end, }, - fzf_opts = { ['--history'] = notes_history }, } return M