phpneovimpsr-1neovim-plugin

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


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,


Solution

  • I have solved it like this:

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