From 68af27a6703bb4ce9a5787a3e937405517ed8023 Mon Sep 17 00:00:00 2001 From: muneebusmani Date: Sat, 8 Jun 2024 14:51:14 +0500 Subject: [PATCH] fix(php): Added Formatting for php --- lua/lazyvim/plugins/extras/lang/php.lua | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/lua/lazyvim/plugins/extras/lang/php.lua b/lua/lazyvim/plugins/extras/lang/php.lua index 334091bb..439e523d 100644 --- a/lua/lazyvim/plugins/extras/lang/php.lua +++ b/lua/lazyvim/plugins/extras/lang/php.lua @@ -35,4 +35,26 @@ return { } end, }, + { + "nvimtools/none-ls.nvim", + optional = true, + opts = function(_, opts) + local nls = require("null-ls") + opts.sources = opts.sources or {} + table.insert(opts.sources, nls.builtins.formatting.pretty_php) + end, + }, + { + "stevearc/conform.nvim", + optional = true, + dependencies = { + "williamboman/mason.nvim", + opts = { ensure_installed = { "pretty-php" } }, + }, + opts = { + formatters_by_ft = { + php = { "pretty-php" }, + }, + }, + }, }