Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ use {
-- Path where project.nvim will store the project history for use in
-- telescope
datapath = vim.fn.stdpath("data"),

-- A function to call then directory is changed
on_chdir = nil,
}
```

Expand Down
3 changes: 3 additions & 0 deletions lua/project_nvim/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ M.defaults = {
-- Path where project.nvim will store the project history for use in
-- telescope
datapath = vim.fn.stdpath("data"),

-- A function to call then directory is changed
on_chdir = nil,
}

---@type ProjectOptions
Expand Down
3 changes: 3 additions & 0 deletions lua/project_nvim/project.lua
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@ function M.set_pwd(dir, method)
if config.options.silent_chdir == false then
vim.notify("Set CWD to " .. dir .. " using " .. method)
end
if config.options.on_chdir then
config.options.on_chdir()
end
end
return true
end
Expand Down