Skip to content

Commit

Permalink
Go to PHP class
Browse files Browse the repository at this point in the history
  • Loading branch information
pizcadesaber committed Jan 10, 2025
1 parent 6c4c93a commit 1c688b9
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 40 deletions.
30 changes: 24 additions & 6 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,36 @@ All notable changes to the "livewire-jump" extension will be documented in this

- No changes yet.

## [1.2.1] - 2025-01-10

- Added support for Blade component classes:
- Navigate between `/resources/views/components/my-class.blade.php` and `/app/Views/Components/MyClass.php`.
- Commands dynamically adjust visibility based on the file type currently open (`Blade` or `PHP`).
- Improved command visibility logic:
- Commands like `Go to Blade View` or `Go to PHP Class` are now context-aware and will only appear in the context menu when applicable.
- Enhanced `Go to` functionality for Livewire components and Blade views.

## [1.2.0] - 2025-01-04

- Go to Livewire view from Livewire class file.
- Autocomplete `<livewire:` with Livewire component names.
- Introduced navigation from Livewire class files to their associated Blade views:
- Right-click on a Livewire class file and select `Go to Livewire View`.
- Added autocomplete for `<livewire:` component tags:
- Displays available Livewire components when typing `<livewire:`.
- Introduced a new setting `livewire-jump.autocomplete.exclude` to exclude certain folders (e.g., the `Pages` subfolder) from the autocomplete suggestions.
- Bug fixes and minor improvements to the command palette.

Read README.md Features andd Known Issues sections. This is a pre-release.
> **Note:** Read the Features and Known Issues sections in the README.md for detailed instructions. This is a pre-release version.
## [1.1.0] - 2024-12-23

- Excludes `<x-slot>`.
- Improved Blade slot handling:
- Excluded `<x-slot>` elements from Livewire-related navigation and autocomplete suggestions.
- Minor performance improvements when navigating between Blade views and PHP classes.

## [1.0.0] - 2024-12-09

- Go to PHP class from Livewire Blade views: Right-click and select `Go to Livewire Class`.
- Go to Livewire or Blade component views from Blade views (`Ctrl+left_click`).
- Initial release with foundational navigation features:
- Navigate from Livewire Blade views to their associated PHP classes using the context menu (`Right-click -> Go to Livewire Class`).
- Added `Ctrl+left_click` navigation support:
- From Blade views to Livewire component classes.
- From Blade component views to their associated PHP classes.
2 changes: 1 addition & 1 deletion dist/extension.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

65 changes: 42 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "Livewire Jump",
"description": "A VS Code extension for navigating Livewire and Blade files in Laravel.",
"icon": "images/icon.jpg",
"version": "1.2.0",
"version": "1.2.1",
"publisher": "pizca",
"repository": {
"type": "git",
Expand All @@ -27,39 +27,38 @@
"Autocomplete"
],
"activationEvents": [
"onLanguage:php"
"onLanguage:php",
"onLanguage:blade"
],
"main": "./dist/extension.js",
"contributes": {
"commands": [
{
"command": "php.livewire.goToClass",
"title": "Go to Livewire class",
"category": "Livewire"
},
{
"command": "php.livewire.goToView",
"title": "Go to Livewire view",
"category": "Livewire"
}
],
"configuration": [
{
"title": "Livewire Jump",
"properties": {
"livewire-jump.autocomplete.enable": {
"type": "boolean",
"default": true,
"description": "Enable autocomplete for <livewire: with component routes."
"livewire-jump.bladePath": {
"type": "string",
"default": "resources/views",
"description": "Blade view resource dir. Livewire view dir must be /livewire to work 'Go to'."
},
"livewire-jump.viewPath": {
"type": "string",
"default": "app/View",
"description": "App view dir (PHP classes). Blade components dir must be /components to work 'Go to'."
},
"livewire-jump.livewirePath": {
"type": "string",
"default": "app/Livewire",
"description": "Livewire components dir (PHP classes)."
},
"livewire-jump.autocomplete.enable": {
"type": "boolean",
"default": true,
"description": "Enable autocomplete for <livewire: with component routes."
},
"livewire-jump.autocomplete.exclude": {
"type": "array",
"description": "Exclude files and folders from autocomplete.",
"description": "Exclude files and folders from autocomplete. It could be useful to exclude full page components.",
"items": {
"type": "string"
},
Expand All @@ -70,16 +69,36 @@
}
}
],
"commands": [
{
"command": "livewire-jump.goToClass",
"title": "Go to PHP Class"
},
{
"command": "livewire-jump.goToView",
"title": "Go to Blade View"
}
],
"menus": {
"commandPalette": [
{
"command": "livewire-jump.goToClass",
"when": "livewire-jump.hasClass"
},
{
"command": "livewire-jump.goToView",
"when": "livewire-jump.hasView"
}
],
"editor/context": [
{
"command": "php.livewire.goToClass",
"when": "resourcePath =~ /livewire/ && editorLangId == blade",
"command": "livewire-jump.goToClass",
"when": "livewire-jump.hasClass",
"group": "navigation"
},
{
"command": "php.livewire.goToView",
"when": "resourcePath =~ /Livewire/ && editorLangId == php",
"command": "livewire-jump.goToView",
"when": "livewire-jump.hasView",
"group": "navigation"
}
]
Expand Down
Loading

0 comments on commit 1c688b9

Please sign in to comment.