Skip to content

PHP helper plugin, can generate docblock, both under the cursor and for the whole class. And also generate setters and getters

Notifications You must be signed in to change notification settings

curkan/phphelper

Repository files navigation

PHPHelper

Plugin for neovim, which will help in creating dock blocks, generating getters and setters for the PHP programming language

Create docblock at cursor PHPHelper gif

Generate all docblock for this class (While it only works with methods) PHPHelpergenerate gif

Generate getter and setter for class PHPHelpergenerate gif

Setup

phphelper uses the nvim-treesitter plugin. You can install both by doing (vim-plug):

Plug 'nvim-treesitter/nvim-treesitter'
Plug 'curkan/phphelper'

Connect the plugin

require "phphelper"

Usage

There are two key bindings provided by default (create php docblock):

<leader>p

you can override:

vim.api.nvim_set_keymap('n', '<leader>p', '<cmd>:PHPAddDocblock()<cr>', default_opts)

Commands:

:PHPAddDocblock
:PHPGenerateAllDocblock
:PHPGenerateGetterAndSetter
:PHPGenerateGetter
:PHPGenerateSetter

About

PHP helper plugin, can generate docblock, both under the cursor and for the whole class. And also generate setters and getters

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages