Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ricardoramirezr/lali-components.nvim

cmp and gf on Laravel/Livewire components
https://github.com/ricardoramirezr/lali-components.nvim

laravel livewire neovim-plugin

Last synced: 3 days ago
JSON representation

cmp and gf on Laravel/Livewire components

Awesome Lists containing this project

README

        

> [!WARNING]
> Any issue please report it at [blade-nav](https://github.com/RicardoRamirezR/blade-nav.nvim)

> [!CAUTION]
> **There is a more comprehensive plugin, [blade-nav](https://github.com/RicardoRamirezR/blade-nav.nvim)** 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](https://github.com/RicardoRamirezR/lali-components.nvim/assets/6526545/62b8227d-8b25-4bf7-b755-6b0d6c1a39f4)

## 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:
- ``
- `@extends('name')`
- `@include('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:
- `
Click Me

@extends('layouts.app')

@include('partials.header')

@livewire('counter')
```

In the example above, you can:

- Place your cursor on , @extends('layouts.app'), @include('partials.header'), , or @livewire('counter') and press gf to navigate to the respective component file.
- Start typing