mirror of
https://github.com/LazyVim/starter.git
synced 2026-07-22 12:31:04 +00:00
Fix listing of files outside root
This commit is contained in:
parent
e84c8948c5
commit
f49ff03773
2 changed files with 27 additions and 0 deletions
14
lua/plugins/project.lua
Normal file
14
lua/plugins/project.lua
Normal file
|
|
@ -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,
|
||||
},
|
||||
}
|
||||
13
lua/plugins/telescope.lua
Normal file
13
lua/plugins/telescope.lua
Normal file
|
|
@ -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["<Space><Space>"] = function()
|
||||
require("telescope.builtin").find_files({
|
||||
cwd = require("project_nvim.project").get_project_root() or vim.fn.getcwd(),
|
||||
})
|
||||
end
|
||||
end,
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue