

⚡ Features
Feature |
Description |
🎨 Syntax Highlighting |
Colorized templates, PHP blocks, and custom directives |
💡 Intelligent Code Completion |
Context-aware suggestions for routes, blocks, and framework helpers |
🚀 Snippets |
route , extends , yield , block , if , foreach templates with tab stops |
🔗 Go to Definition |
Jump to route definitions and template blocks (Ctrl+Click/ alt+Click) |
✨ Formatting |
Professional code formatting with customizable rules |
⚙️ Commands |
Integrated server control and framework utilities |
📦 Installation
Visual Studio Code Marketplace

- Open Extensions view (
Ctrl+Shift+X )
- Search for "Pocketframe Tools"
- Click Install
- Reload VS Code
🛠️ Usage
Basic Template Example
<%-- posts.view.php --%>
<% extends "layouts/app" %>
<% block title %>
<%= $pageTitle %>
<% endblock %>
<% block content %>
<div class="container">
<% foreach ($posts as $post) %>
<article class="post">
<h2><%= $post->title %></h2>
<a href="<%= route('posts.edit', ['id' => $post->id]) %>">Edit</a>
</article>
<% endforeach %>
</div>
<% endblock %>
⌨️ Keyboard Shortcuts
Command |
Shortcut |
Description |
Format Document |
Shift+Alt+F |
Reformat current file |
Show Commands |
Ctrl+Shift+P |
Access Pocketframe commands |
Go to Definition |
Ctrl+Click |
Navigate to symbol definition |
Trigger Suggestions |
Ctrl+Space |
Show context-aware completions |
⚙️ Configuration
Add to your VS Code settings (settings.json):
{
"pocketframe.format": {
"indentSize": 4,
"maxLineLength": 120,
"wrapAttributes": true
},
"pocketframe.analysis": {
"validateRoutes": true,
"checkCSRFTokens": true
}
}
🧩 Extension Settings
Setting |
Default |
Description |
pocketframe.format.indentSize |
4 |
Spaces per indentation level |
pocketframe.format.wrapAttributes |
true |
Wrap long HTML attributes |
pocketframe.analysis.validateRoutes |
true |
Verify route existence |
pocketframe.server.autoStart |
false |
Auto-start dev server on project open |
🚧 Development
Prerequisites
- Node.js 16+
- TypeScript 4.9+
- VS Code Extension Development Tools
Build from Source
git clone https://github.com/Pocketframe/pocketframe-tools.git
cd pocketframe-tools
npm install
npm run compile
Test in Development Host
- Press F5 to launch the extension debugger.
- Open a
.view.php file in the test workspace.
- Test extension features.
🤝 Contributing
We welcome contributions! Follow these steps:
- Fork the repository
- Create a feature branch: git checkout -b feature/amazing-feature
- Commit changes: git commit -m 'Add amazing feature'
- Push to branch: git push origin feature/amazing-feature
- Open a Pull Request
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
Maintained with ❤️ by the Pocketframe Team.
| |