Skip to content
Merged
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
17 changes: 15 additions & 2 deletions lua/laravel/options/environments.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@

---@class LaravelOptionsEnvironments
---@field env_variable string
---@field auto_dicover boolean
---@field auto_discover boolean
---@field default string
---@field definitions LaravelEnvironmentConfig[]
return {
env_variable = "NVIM_LARAVEL_ENV",
auto_dicover = true,
auto_discover = true,
default = "local",
definitions = {
{
Expand Down Expand Up @@ -50,6 +50,19 @@ return {
},
},
},
{
name = "herd",
condition = {
executable = { "herd" },
},
commands = {
herd = { "herd" },
{
commands = { "php", "composer" },
prefix = { "herd" },
},
},
},
{
name = "local",
condition = {
Expand Down
2 changes: 1 addition & 1 deletion lua/laravel/services/environment.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function environment:boot()
end
end

if opts.auto_dicover then
if opts.auto_discover then
for _, opt in ipairs(opts.definitions) do
local env = Environment:new(opt)
if env:check() then
Expand Down