From 8eed75d67f9cbcefb91c4cb5aac0ffd013be25cc Mon Sep 17 00:00:00 2001 From: kylo252 <59826753+kylo252@users.noreply.github.com> Date: Mon, 13 Sep 2021 11:28:15 +0200 Subject: refactor: use more flexible paths (#1381) --- lua/core/telescope.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lua/core/telescope.lua') diff --git a/lua/core/telescope.lua b/lua/core/telescope.lua index 4ae56df0..34c1fb92 100644 --- a/lua/core/telescope.lua +++ b/lua/core/telescope.lua @@ -1,5 +1,7 @@ local M = {} +local utils = require "utils" + function M.config() -- Define this minimal config so that it's available if telescope is not yet available. lvim.builtin.telescope = { @@ -96,7 +98,7 @@ function M.find_lunarvim_files(opts) }, prompt = ">> ", prompt_title = "~ LunarVim files ~", - cwd = CONFIG_PATH, + cwd = utils.join_paths(get_runtime_dir(), "lvim"), find_command = { "git", "ls-files" }, } opts = vim.tbl_deep_extend("force", theme_opts, opts) @@ -111,7 +113,7 @@ function M.grep_lunarvim_files(opts) layout_strategy = "bottom_pane", prompt = ">> ", prompt_title = "~ search LunarVim ~", - cwd = CONFIG_PATH, + cwd = utils.join_paths(get_runtime_dir(), "lvim"), } opts = vim.tbl_deep_extend("force", theme_opts, opts) require("telescope.builtin").live_grep(opts) -- cgit v1.2.3