Skip to content

Latest commit

 

History

History
45 lines (29 loc) · 1.12 KB

README.md

File metadata and controls

45 lines (29 loc) · 1.12 KB

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