From 39b6c223568c54c05a466f375cc82ac35a5ff78b Mon Sep 17 00:00:00 2001 From: "asep.komarudin" Date: Mon, 24 Jun 2024 06:56:05 +0700 Subject: [PATCH] add: php lint for default config --- lua/plugins/phpcfg.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lua/plugins/phpcfg.lua b/lua/plugins/phpcfg.lua index 9d0b17b..0f737ca 100644 --- a/lua/plugins/phpcfg.lua +++ b/lua/plugins/phpcfg.lua @@ -136,11 +136,11 @@ if pcode.active_php_config then { "mfussenegger/nvim-lint", events = { "BufWritePost", "BufReadPost", "InsertLeave" }, - opts = { - linters_by_ft = { - php = { "phpcs" }, - }, - }, + opts = function(_, opts) + opts.linters_by_ft = opts.linters_by_ft or {} + opts.linters_by_ft.php = { "phpcs" } + return opts + end, config = function(_, opts) require("lint").linters_by_ft = opts.linters_by_ft end,