RicardoRamirezR/
lali-components.nvim
g4t.io

Neovim Plugin to for Navigating Laravel and Livewire Components

16 views 28 stars by Paul Redmond

cmp and gf on Laravel/Livewire components

laravel livewire neovim-plugin
README from RicardoRamirezR/lali-components.nvim Open on GitHub →

[!WARNING] Any issue please report it at blade-nav

[!CAUTION] There is a more comprehensive plugin, blade-nav It opens views from controllers and routes for view(), View::make(), and Route::view(). Additionally, it can generate a component using an Artisan command as an option. Sorry for any inconvenience. Why not here? My OCD wins, since blade-nav is a superset of this plugin.

Laravel / Livewire Components

lali

Features

1. Navigating to Components with gf

Using the gf command on certain component names in your code will open the corresponding component file. This feature works with the following patterns:

  • <x-name>
  • @extends('name')
  • @include('name')
  • <livewire:name>
  • @livewire('name')

If the component has an associated class, you will be prompted to choose which one to open.

2. Autocompletion with nvim-cmp

When using the Neovim completion plugin (nvim-cmp), suggestions for relevant components will appear as you type the following prefixes:

  • <x-
  • @extends
  • @include
  • <live
  • @livewire

Setup

To get started with lali-components.nvim, add the plugin to your init.lua or init.vim file:

Using packer:

use {
    'ricardoramirezr/lali-components.nvim',
    ft = 'blade'
}

Using lazy:

{
    'ricardoramirezr/lali-components.nvim',
    ft = 'blade'
}

Usage

  1. Navigating to Components: Place your cursor on the component name and press gf. If the component has multiple classes, you will be prompted to choose which one to open.

  2. Autocompletion: Start typing the component prefix (<x-, @extends, etc.) and nvim-cmp will suggest the relevant components. Select from the suggestions to complete your component names quickly.

Example

Here is an example to illustrate the usage of the plugin:

<!-- Blade Template Example -->
<x-button>Click Me</x-button>

@extends('layouts.app')

@include('partials.header')

<livewire:counter />
@livewire('counter')

In the example above, you can:

  • Place your cursor on , @extends('layouts.app'), @include('partials.header'), <livewire:counter />, or @livewire('counter') and press gf to navigate to the respective component file.
  • Start typing <x-, @extends, @include, <live, or @livewire to get autocompletion suggestions from nvim-cmp.

Contributing

Contributions are welcome! Please submit issues and pull requests to the GitHub repository.

License

This plugin is open-source and distributed under the MIT License.

More from the ecosystem

durable-workflow/
workflow
g4t.io
9 1,292

Durable Workflow: Long-Running Workflows for Laravel

Embedded durable workflow runtime and orchestration engine for Laravel applications.

durable-workflow/workflow via Laravel News
packstub/
session-replay
g4t.io
14 52

Session Replay for Laravel: Self-Hosted Browser Recordings

Session replay for Laravel: record what a person did in the browser with rrweb, keep the recording on your own disk and database, and watch it behind a gate you define — masked inputs by default, errors, failed Livewire requests and web vitals marked on the timeline, a link to the replay in every log line. packstub/filament-session-replay adds the sessions to a Filament panel.

packstub/session-replay via Laravel News
cyberwizard-dev/
schedule-catchup
g4t.io
17

Replay Missed Laravel Scheduled Tasks With Schedule Catchup

Schedule Catchup replays missed Laravel scheduled tasks after downtime, with opt-in recovery, bounded retries, and access to the original scheduled date.

cyberwizard-dev/schedule-catchup via Laravel News