From ee1d1b1d7ae0761b008a541a727258508dde847f Mon Sep 17 00:00:00 2001 From: Ariel D'Alessandro Date: Tue, 4 Apr 2023 09:14:49 +0200 Subject: feat(php) fix phpstan for symfony, add new snippet --- lua/alpha/lsp/null-ls.lua | 4 ++-- lua/alpha/snips/ft/php.lua | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'lua') diff --git a/lua/alpha/lsp/null-ls.lua b/lua/alpha/lsp/null-ls.lua index f95c443..0a4443a 100644 --- a/lua/alpha/lsp/null-ls.lua +++ b/lua/alpha/lsp/null-ls.lua @@ -17,9 +17,9 @@ null_ls.setup { null_ls.builtins.diagnostics.phpstan.with { to_temp_file = false, method = null_ls.methods.DIAGNOSTICS_ON_SAVE, - command = "./vendor/bin/phpstan", + command = "./bin/phpstan", condition = function () - return vim.fn.findfile("vendor/bin/phpstan") ~= "" + return vim.fn.findfile("bin/phpstan") ~= "" end }, null_ls.builtins.diagnostics.phpcs.with { diff --git a/lua/alpha/snips/ft/php.lua b/lua/alpha/snips/ft/php.lua index b930cb6..72936d8 100644 --- a/lua/alpha/snips/ft/php.lua +++ b/lua/alpha/snips/ft/php.lua @@ -94,6 +94,14 @@ M.op = fmt( } ) +M.iop = fmt( + [[$this->{} = $this->prophesize({}::class);]], + { + i(1, ""), + i(2, ""), + } +) + M.arg = fmt([[{} ${}]], { i(1, "Type"), d(2, var_name, { 1 }), -- cgit v1.2.3