Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: getterSetter code action #33

Merged
merged 5 commits into from
May 30, 2022
Merged

Conversation

yaegassy
Copy link
Owner

@yaegassy yaegassy commented May 30, 2022

Description

Added code action to quickly generate getters and setters. it feature intelligently implemented using php-parser.

If a similar feature is added in the upstream in the future, this feature, which was added independently by coc-intelephense, will of course be removed.

Misc

The VSCode community seems to have a number of dedicated extensions for getterSetter.

@yaegassy
Copy link
Owner Author

yaegassy commented May 30, 2022

DEMO (mp4)

Insert PHP Getter

Works with <Plug>(coc-codeaction-line) and <Plug>(coc-codeaction-selected)

Example key mapping:

nmap <silent> ga <Plug>(coc-codeaction-line)
xmap <silent> ga <Plug>(coc-codeaction-selected)
coc-intelepehnse-01-getter.mp4

@yaegassy
Copy link
Owner Author

yaegassy commented May 30, 2022

DEMO (mp4)

Insert PHP Setter

Works with <Plug>(coc-codeaction-line) and <Plug>(coc-codeaction-selected)

Example key mapping:

nmap <silent> ga <Plug>(coc-codeaction-line)
xmap <silent> ga <Plug>(coc-codeaction-selected)
coc-intelepehnse-02-setter.mp4

@yaegassy
Copy link
Owner Author

yaegassy commented May 30, 2022

DEMO (mp4)

Insert PHP Getter & Setter

Works with <Plug>(coc-codeaction-line) and <Plug>(coc-codeaction-selected)

Example key mapping:

nmap <silent> ga <Plug>(coc-codeaction-line)
xmap <silent> ga <Plug>(coc-codeaction-selected)
coc-intelepehnse-03-getter-setter.mp4

@yaegassy yaegassy merged commit 24850ab into master May 30, 2022
@yaegassy yaegassy deleted the feat/getter-setter-action branch May 30, 2022 04:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant