Is there a way to set/change the coding standard for php in null-ls in nvim?

342 Views Asked by At

I have setup null-ls plugin to use phpcs for diagnostics and phpcdf for formatting. However I cannot seem to find a way to set the coding standard for phpcs/phpcbf. I want to change it from PEAR to PSR-1. Any help will be appreciated!

thank you all for your time,

regards,

1

There are 1 best solutions below

0
On

I have solved it like this:

null_ls.setup({
        sources = {
                null_ls.builtins.formatting.phpcbf.with({ extra_args = { "--standard=Drupal" } })
        },
})