Skip to content

Instantly share code, notes, and snippets.

@erickpatrick
Created January 25, 2021 14:30
Show Gist options
  • Save erickpatrick/72d7cd5ac054fbc59c192e88ee09a4c5 to your computer and use it in GitHub Desktop.
Save erickpatrick/72d7cd5ac054fbc59c192e88ee09a4c5 to your computer and use it in GitHub Desktop.
coc phpcs

instructions

  • Install phpcs as per their readme and add a phpcs.xml to the root of the project with your rules.
  • Install Coc-diagnostic (:CocInstall coc-diagnostic)

On you ~/.config/nvim/coc-settings.json

{
    [...]
    "diagnostic-languageserver.filetypes": {
        "php": ["phpcs"]
    },
    [...]
}

Restart vim. You should already start seeing your PHP files with possible errors poping up =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment