{"id":20383256,"url":"https://github.com/praem90/nvim-phpcsf","last_synced_at":"2025-04-12T09:14:04.897Z","repository":{"id":91832275,"uuid":"367098487","full_name":"praem90/nvim-phpcsf","owner":"praem90","description":"A simple nvim plugin wrapper for both phpcs and phpcbf. ","archived":false,"fork":false,"pushed_at":"2025-03-06T13:43:28.000Z","size":32,"stargazers_count":16,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T09:13:53.966Z","etag":null,"topics":["lua","nvim","nvim-plugin","php-codesniffer"],"latest_commit_sha":null,"homepage":"https://praem90.github.io/nvim-phpcsf/","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/praem90.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-05-13T15:50:40.000Z","updated_at":"2025-04-09T10:18:32.000Z","dependencies_parsed_at":"2024-06-13T07:34:55.283Z","dependency_job_id":"cd473b3f-848e-4e3e-a914-15b883640c3b","html_url":"https://github.com/praem90/nvim-phpcsf","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/praem90%2Fnvim-phpcsf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/praem90%2Fnvim-phpcsf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/praem90%2Fnvim-phpcsf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/praem90%2Fnvim-phpcsf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/praem90","download_url":"https://codeload.github.com/praem90/nvim-phpcsf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248543840,"owners_count":21121838,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lua","nvim","nvim-plugin","php-codesniffer"],"created_at":"2024-11-15T02:21:41.612Z","updated_at":"2025-04-12T09:14:04.872Z","avatar_url":"https://github.com/praem90.png","language":"Lua","readme":"# nvim-phpcsf\n\n## What is nvim-phpcsf?\n`nvim-phpcsf` is a simple nvim plugin wrapper for both phpcs and phpcbf.\nThe PHP_CodeSniffer's output is populated using the telescope picker. Telescope helps to navigate through phpcs errors and warnings and preview.\n\n\n## Instalation\nInstall [telescope](https://github.com/nvim-telescope/telescope.nvim) and [PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer).\nUsing the [vim-plug](https://github.com/junegunn/vim-plug) plugin manager add the following in your VIM configuration (e.g. ~/.vimrc or ~/.config/nvim/init.vim when using Neovim):\n\n```\nPlug 'praem90/nvim-phpcsf'\n```\n\nTo run sniffer\n```\n:lua require'phpcs'.cs()\n```\n\nTo run beautifier\n```\n:lua require'phpcs'.cbf()\n```\n\nTo run PHP_CodeBeautifier after save (It is recommended to run this after the buffer has been written BufWritePost)\n```\naugroup PHBSCF\n    autocmd!\n    autocmd BufWritePost,BufReadPost,InsertLeave *.php :lua require'phpcs'.cs()\n    autocmd BufWritePost *.php :lua require'phpcs'.cbf()\naugroup END\n```\n\n## Configurations\n```vim\nlet g:nvim_phpcs_config_phpcs_path = 'phpcs'\nlet g:nvim_phpcs_config_phpcbf_path = 'phpcbf'\nlet g:nvim_phpcs_config_phpcs_standard = 'PSR12' \" or path to your ruleset phpcs.xml\n```\n\nUsing lua\n\n```lua\nrequire(\"phpcs\").setup({\n  phpcs = \"phpcs\",\n  phpcbf = \"phpcbf\",\n  standard = \"PSR12\"\n})\n```\n\n## Thanks\n[@thePrimeagen](https://github.com/theprimeagen)\n[@tjDevries](https://github.com/tjDevries)\n\n## TODO:\n - [x] Detect phpcs.xml automatically on the project root\n - [x] Add sign to current buffer\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpraem90%2Fnvim-phpcsf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpraem90%2Fnvim-phpcsf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpraem90%2Fnvim-phpcsf/lists"}