From e12fc47f747b7f7fef1b0f6576aaef99400ab121 Mon Sep 17 00:00:00 2001 From: muneebusmani Date: Sun, 9 Jun 2024 19:26:30 +0500 Subject: [PATCH] phpcs linter, php-cs-fixer formatter --- lua/lazyvim/plugins/extras/lang/php.lua | 27 ++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/php.lua b/lua/lazyvim/plugins/extras/lang/php.lua index 58d14e91..200da9b7 100644 --- a/lua/lazyvim/plugins/extras/lang/php.lua +++ b/lua/lazyvim/plugins/extras/lang/php.lua @@ -42,18 +42,31 @@ return { local nls = require("null-ls") opts.sources = opts.sources or {} table.insert(opts.sources, nls.builtins.formatting.phpcsfixer) + table.insert(opts.sources, nls.builtins.diagnostics.phpcs) end, }, { - "stevearc/conform.nvim", + "mfussenegger/nvim-lint", optional = true, - dependencies = { - "williamboman/mason.nvim", - opts = { ensure_installed = { "php-cs-fixer" } }, - }, opts = { - formatters_by_ft = { - php = { "php-cs-fixer" }, + linters_by_ft = { + php = { "phpcs" }, + }, + }, + { + "stevearc/conform.nvim", + optional = true, + dependencies = { + "williamboman/mason.nvim", + opts = { ensure_installed = { + "phpcs", + "php-cs-fixer", + } }, + }, + opts = { + formatters_by_ft = { + php = { "php-cs-fixer" }, + }, }, }, },