deoplete-laravel-plugin


Ⅰ. 插件描述

A test plugin based on idea-php-laravel-plugin for Vim using deoplete.

Ⅱ. 基本信息

创建日期:  2016-07-06
使用用户:  1
Github星:  9
插件作者:  Rafael Nascimento

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'rafaelndev/deoplete-laravel-plugin'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'rafaelndev/deoplete-laravel-plugin'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'rafaelndev/deoplete-laravel-plugin'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/rafaelndev/deoplete-laravel-plugin

Ⅳ. 文档说明

# Deoplete Laravel Plugin

Introduction

Autocompletion for Laravel Routes and Views in Vim, for neovim-deoplete.

Features

  • Autocomplete Laravel Routes based on controllers public methods.

    • Works on following commands:

      • Route:get, post, delete, put, patch, options('...')
      • Blade action('...')
      • Route 'uses' => '...'
  • Autocomplete Laravel Blade Views.

    • Works on following commands:

      • view('...')
      • @extends('...')
      • @include('...')
      • @each('...')
  • Cache for faster completion (Alpha).

Installation and usage

Requeriments

  • PHP 5.4+
  • Composer
  • Python 2/3
  • Neovim / Deoplete Plugin
  • A Laravel Project (tested on 5.1+)

Installation

You can use your plugin manager of choice, but we recommend Vim-Plug

  • vim-plug

    • Add Plug 'rafaelndev/deoplete-laravel-plugin', {'for': ['php'], 'do': 'composer install'} to .vimrc
    • Run :PlugInstall

Usage

If your system meet all requirements, it should works automatically when typing the supported functions (see Features).

TODO

  • [ ] Section completion.
  • [ ] Support for common vim (omnifunc).
  • [ ] PHP Server to receive and send info to vim/neovim (possibly using ReactPHP HTTP or Sockets).
  • [ ] Better cache mechanics.

添加新评论