Code Monkey home page Code Monkey logo

deoplete-padawan's Introduction

deoplete-padawan

Project Status: Active - The project has reached a stable, usable state and is being actively developed. Build Status

deoplete.nvim source for padawan.php.

Deoplete-padawan offers asynchronous completion of code written in PHP using padawan.php and deoplete.nvim.

It requires neovim as deoplete requires it.

Demo

demo demo2

Installation

You need to install padawan.php and index your project. The plugin requires padawan.php server running to work. Go to project GitHub page for details.

Using vim-plug:

Plug 'Shougo/deoplete.nvim'

Plug 'padawan-php/deoplete-padawan'

Using Vundle:

Plugin 'Shougo/deoplete.nvim'

Plugin 'padawan-php/deoplete-padawan'

Configuration

The plugin requires no configuration. However, it is possible to change some options.

Available settings

Variable Default
g:deoplete#sources#padawan#server_addr http://127.0.0.1:15155
g:deoplete#sources#padawan#server_command padawan-server
g:deoplete#sources#padawan#log_file /tmp/padawan-server.log
g:deoplete#sources#padawan#server_autostart 1
g:deoplete#sources#padawan#add_parentheses 0
g:deoplete#sources#padawan#auto_update 0
  • g:deoplete#sources#padawan#server_addr

Address to padawan.php server. By default, it is http://127.0.0.1:15155

  • g:deoplete#sources#padawan#server_command

If your padawan-server bin is not in $PATH then you can set up this to point it directly, ie: /path/to/padawan/bin/padawan-server.

  • g:deoplete#sources#padawan#log_file

Padawan.php log file path, if empty log won't be stored anywhere. By default, it goes to /tmp/padawan-server.log unless you have no /tmp directory, in that case log won't be saved.

  • g:deoplete#sources#padawan#server_autostart

The plugin will try to start padawan.php server automatically when completion is triggered. Any value but 1 will make this option disabled.

  • g:deoplete#sources#padawan#add_parentheses

If set to 1 parentheses will be added to function (method) completion. If function accepts parameters, only opening parenthesis will be added.

  • g:deoplete#sources#padawan#auto_update If set to 1 send update command to server automatically when BufWritePost event is triggered.

Additional commands

By default, the plugin is not creating any vim commands. However, there are some functions available to manage the padawan.php server.

  • call deoplete#sources#padawan#StartServer()

Will start padawan-server.

  • call deoplete#sources#padawan#StopServer()

Will kill padawan-server.

  • call deoplete#sources#padawan#RestartServer()

Will kill padawan-server and start it again.

Custom commands

If you would like to have simpler commands, you can add them to your vimrc file. Snippet below shows how to add StartPadawan, StopPadawan and RestartPadawan commands.

command! StartPadawan call deoplete#sources#padawan#StartServer()
command! StopPadawan call deoplete#sources#padawan#StopServer()
command! RestartPadawan call deoplete#sources#padawan#RestartServer()

Todo

  • Update configuration section
  • Provide actions to start and stop padawan.php server
  • Add Vim help file

Contribution

Always welcome.

Credits

Plugin is based on padawan.vim, deoplete-jedi and deoplete-go.

License

MIT License; The software is provided "as is", without warranty of any kind.

deoplete-padawan's People

Contributors

gitter-badger avatar mkusher avatar musou1500 avatar pbogut avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.