Skip to content

Commit dd7c2c4

Browse files
committed
Fixes
1 parent 394093f commit dd7c2c4

File tree

5 files changed

+334
-107
lines changed

5 files changed

+334
-107
lines changed

LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Luminarix Labs
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,54 @@
1-
# phpstorm-function-comments
1+
# Function Comments
22

33
![Build](https://github.com/luminarix/phpstorm-function-comments/workflows/Build/badge.svg)
44
[![Version](https://img.shields.io/jetbrains/plugin/v/MARKETPLACE_ID.svg)](https://plugins.jetbrains.com/plugin/MARKETPLACE_ID)
55
[![Downloads](https://img.shields.io/jetbrains/plugin/d/MARKETPLACE_ID.svg)](https://plugins.jetbrains.com/plugin/MARKETPLACE_ID)
66

7-
## Template ToDo list
8-
- [x] Create a new [IntelliJ Platform Plugin Template][template] project.
9-
- [ ] Get familiar with the [template documentation][template].
10-
- [ ] Adjust the [pluginGroup](./gradle.properties) and [pluginName](./gradle.properties), as well as the [id](./src/main/resources/META-INF/plugin.xml) and [sources package](./src/main/kotlin).
11-
- [ ] Adjust the plugin description in `README` (see [Tips][docs:plugin-description])
12-
- [ ] Review the [Legal Agreements](https://plugins.jetbrains.com/docs/marketplace/legal-agreements.html?from=IJPluginTemplate).
13-
- [ ] [Publish a plugin manually](https://plugins.jetbrains.com/docs/intellij/publishing-plugin.html?from=IJPluginTemplate) for the first time.
14-
- [ ] Set the `MARKETPLACE_ID` in the above README badges. You can obtain it once the plugin is published to JetBrains Marketplace.
15-
- [ ] Set the [Plugin Signing](https://plugins.jetbrains.com/docs/intellij/plugin-signing.html?from=IJPluginTemplate) related [secrets](https://github.com/JetBrains/intellij-platform-plugin-template#environment-variables).
16-
- [ ] Set the [Deployment Token](https://plugins.jetbrains.com/docs/marketplace/plugin-upload.html?from=IJPluginTemplate).
17-
- [ ] Click the <kbd>Watch</kbd> button on the top of the [IntelliJ Platform Plugin Template][template] to be notified about releases containing new features and fixes.
18-
- [ ] Configure the [CODECOV_TOKEN](https://docs.codecov.com/docs/quick-start) secret for automated test coverage reports on PRs
19-
207
<!-- Plugin description -->
21-
This Fancy IntelliJ Platform Plugin is going to be your implementation of the brilliant ideas that you have.
8+
A PhpStorm plugin that lets you quickly comment or uncomment entire PHP functions with a single keyboard shortcut.
9+
10+
**Features:**
11+
- Comment/uncomment complete functions including PHP 8+ attributes
12+
- Single-line (`//`) and multi-line (`/* */`) comment styles
13+
- Toggle behavior: automatically detects if function is commented and performs the opposite action
14+
- Smart handling of nested block comments (falls back to single-line style when necessary)
15+
- Available via keyboard shortcuts and editor context menu
16+
17+
**Known Limitations:**
18+
- No proper support for anonymous functions or closures
19+
20+
**Roadmap:**
21+
- Support for anonymous functions and closures
22+
23+
24+
## Usage
25+
26+
Place your cursor anywhere inside a PHP function and use:
2227

23-
This specific section is a source for the [plugin.xml](/src/main/resources/META-INF/plugin.xml) file which will be extracted by the [Gradle](/build.gradle.kts) during the build process.
28+
| Action | Shortcut | Description |
29+
|--------|----------|-------------|
30+
| Comment Function (Single-Line) | <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>/</kbd> | Comments each line with `//` |
31+
| Comment Function (Multi-Line) | <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>Shift</kbd>+<kbd>/</kbd> | Wraps function in `/* */` |
2432

25-
To keep everything working, do not remove `<!-- ... -->` sections.
33+
34+
Both actions are also available via right-click menu under **Function Comments**.
35+
36+
To uncomment, use the same shortcut on an already-commented function.
2637
<!-- Plugin description end -->
2738

2839
## Installation
2940

3041
- Using the IDE built-in plugin system:
3142

32-
<kbd>Settings/Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>Marketplace</kbd> > <kbd>Search for "phpstorm-function-comments"</kbd> >
43+
<kbd>Settings/Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>Marketplace</kbd> > <kbd>Search for "Function Comments"</kbd> >
3344
<kbd>Install</kbd>
3445

35-
- Using JetBrains Marketplace:
36-
37-
Go to [JetBrains Marketplace](https://plugins.jetbrains.com/plugin/MARKETPLACE_ID) and install it by clicking the <kbd>Install to ...</kbd> button in case your IDE is running.
38-
39-
You can also download the [latest release](https://plugins.jetbrains.com/plugin/MARKETPLACE_ID/versions) from JetBrains Marketplace and install it manually using
40-
<kbd>Settings/Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>⚙️</kbd> > <kbd>Install plugin from disk...</kbd>
41-
4246
- Manually:
4347

4448
Download the [latest release](https://github.com/luminarix/phpstorm-function-comments/releases/latest) and install it manually using
4549
<kbd>Settings/Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>⚙️</kbd> > <kbd>Install plugin from disk...</kbd>
4650

47-
4851
---
4952
Plugin based on the [IntelliJ Platform Plugin Template][template].
5053

5154
[template]: https://github.com/JetBrains/intellij-platform-plugin-template
52-
[docs:plugin-description]: https://plugins.jetbrains.com/docs/intellij/plugin-user-experience.html#plugin-description-and-presentation

0 commit comments

Comments
 (0)