From f305d34d093a70dbdb770b55df9d5c876f81bf8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rando=20O=CC=83ispuu?= Date: Thu, 13 Feb 2025 21:23:22 +0000 Subject: [PATCH 1/2] feat: add Herd environment support Add support for Laravel Herd development environment by introducing a new configuration that allows running PHP and Composer commands through the Herd CLI tool. --- lua/laravel/options/environments.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lua/laravel/options/environments.lua b/lua/laravel/options/environments.lua index f07b56a..166a1ae 100644 --- a/lua/laravel/options/environments.lua +++ b/lua/laravel/options/environments.lua @@ -50,6 +50,19 @@ return { }, }, }, + { + name = "herd", + condition = { + executable = { "herd" }, + }, + commands = { + herd = { "herd" }, + { + commands = { "php", "composer" }, + prefix = { "herd" }, + }, + }, + }, { name = "local", condition = { From 2a177a4570f73ade6cb1d885699e1819ee9d7a5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rando=20O=CC=83ispuu?= Date: Thu, 13 Feb 2025 21:24:12 +0000 Subject: [PATCH 2/2] fix: correct auto_discover typo in config Fix typo in configuration option name from "auto_dicover" to "auto_discover" to maintain consistency and correct spelling throughout the codebase. --- lua/laravel/options/environments.lua | 4 ++-- lua/laravel/services/environment.lua | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/laravel/options/environments.lua b/lua/laravel/options/environments.lua index 166a1ae..fa7d702 100644 --- a/lua/laravel/options/environments.lua +++ b/lua/laravel/options/environments.lua @@ -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 = { { diff --git a/lua/laravel/services/environment.lua b/lua/laravel/services/environment.lua index 45b16fa..43c1392 100644 --- a/lua/laravel/services/environment.lua +++ b/lua/laravel/services/environment.lua @@ -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