diff options
| author | Ariel D'Alessandro <dalessandro.ariel@gmail.com> | 2021-11-05 09:05:18 +0100 |
|---|---|---|
| committer | Ariel D'Alessandro <dalessandro.ariel@gmail.com> | 2021-11-05 09:05:18 +0100 |
| commit | 7c9a398973e01ebd686a3866f8b2a47473e0e89c (patch) | |
| tree | e03267312dbdc39cc9a620b5df08d18f84f2d82c /lua | |
| parent | 18e651fd6f19551128f530328f9ffe6a0037a6e2 (diff) | |
| download | nvim-conf-7c9a398973e01ebd686a3866f8b2a47473e0e89c.tar.gz nvim-conf-7c9a398973e01ebd686a3866f8b2a47473e0e89c.zip | |
Update to support sail
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/alpha/telescope_laravel.lua | 20 | ||||
| -rw-r--r-- | lua/plugins.lua | 1 |
2 files changed, 15 insertions, 6 deletions
diff --git a/lua/alpha/telescope_laravel.lua b/lua/alpha/telescope_laravel.lua index b1fc3c4..155aaf2 100644 --- a/lua/alpha/telescope_laravel.lua +++ b/lua/alpha/telescope_laravel.lua @@ -28,13 +28,21 @@ local mt_string_entry = { end, } +function getArtisanCommand(args) + local artCmdStr = vim.g.laravel_artisan + if artCmdStr == nil then + artCmdStr = "php artisan" + end + if type(args) ~= "table" then + return Split(artCmdStr .. ' ' .. args, " ") + end + + return {unpack(Split(artCmdStr, ' ')), unpack(args)} +end + laravel.artisan = function() - local results = utils.get_os_command_output({ - "php", - "artisan", - "--raw", - }) + local results = utils.get_os_command_output(getArtisanCommand('--raw')) pickers.new({}, { prompt_title = "Artisan commands", @@ -54,7 +62,7 @@ laravel.artisan = function() define_preview = function(self, entry) - local cmd = { "php", "artisan", entry.value, "-h" } + local cmd = getArtisanCommand({entry.value, '-h'}) putils.job_maker(cmd, self.state.bufnr, { value = entry.value, diff --git a/lua/plugins.lua b/lua/plugins.lua index fa901b0..e092603 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -112,6 +112,7 @@ return require('packer').startup(function(use) use 'Raimondi/delimitMate' use 'tpope/vim-surround' + use 'tpope/vim-dotenv' use 'tpope/vim-fugitive' use 'tpope/vim-repeat' use 'tpope/vim-obsession' |