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 lua/sidekick/cli/session/tmux.lua
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ function M:add_cmd(ret)
vim.list_extend(ret, { "-e", ("%s=%s"):format(key, tostring(value)) })
end
end
if Config.cli.mux.direnv and vim.fn.executable("direnv") == 1 then
vim.list_extend(ret, { "direnv", "exec", self.cwd })
end
vim.list_extend(ret, self.tool.cmd)
end

Expand Down
4 changes: 4 additions & 0 deletions lua/sidekick/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ local defaults = {
vertical = true, -- vertical or horizontal split
size = 0.5, -- size of the split (0-1 for percentage)
},
-- when true and `direnv` is on PATH, tool commands spawned in external
-- tmux panes are wrapped with `direnv exec <cwd>` so per-project
-- .envrc files are applied.
direnv = false,
},
--- Actual cli tool config is loaded from the runtime path `sk/cli/{tool}.lua` and merged with the config below.
--- For default configs, see https://github.com/folke/sidekick.nvim/tree/main/sk/cli
Expand Down