diff --git a/lua/plugins/project.lua b/lua/plugins/project.lua new file mode 100644 index 0000000..9cfbd6e --- /dev/null +++ b/lua/plugins/project.lua @@ -0,0 +1,14 @@ +-- lua/plugins/project.lua +return { + { + "ahmedkhalf/project.nvim", + config = function() + require("project_nvim").setup({ + detection_methods = { "pattern" }, + patterns = { ".git", "Gemfile", "package.json" }, -- Adjust for your project + sync_root_with_cwd = true, -- Ensure working directory syncs with root + }) + require("telescope").load_extension("projects") + end, + }, +} diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua new file mode 100644 index 0000000..7405295 --- /dev/null +++ b/lua/plugins/telescope.lua @@ -0,0 +1,13 @@ +-- lua/plugins/telescope.lua +-- https://www.lazyvim.org/extras/editor/telescope +return { + "nvim-telescope/telescope.nvim", + opts = function(_, opts) + opts.keys = opts.keys or {} + opts.keys[""] = function() + require("telescope.builtin").find_files({ + cwd = require("project_nvim.project").get_project_root() or vim.fn.getcwd(), + }) + end + end, +}