GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - padawan-php/padawan.php: php intelligent code completion http server

BranchesTags
Open more actions menu

Latest commit

 

History

228 Commits
228 Commits

Folders and files

NameName
Last commit message
Last commit date
app/config
app/config
 
 
bin
bin
 
 
features
features
 
 
specs
specs
 
 
src/Padawan
src/Padawan
 
 
stubs
stubs
 
 
.gitignore
.gitignore
 
 
.travis.yml
.travis.yml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
behat.yml
behat.yml
 
 
composer.json
composer.json
 
 
peridot.php
peridot.php
 
 

Repository files navigation

Padawan.php smart php intelligent code completion for php projects

Join the chat at https://gitter.im/mkusher/padawan.php

Build Status Total Downloads Latest Stable Version Latest Unstable Version Scrutinizer Code Quality License

Looking for maintainers! Please join gitter channel for discussion

Padawan.php is an http server that parses your project and gives you completions. Padawan.php looks recursively for all php files of a composer project, parses doc-comments and function declarations of each class and creates an index from them. After that it autoupdates the index and gives you completion as you type.

Padawan.php can be extended by various plugins, which will bring some extra completion, framework integrations or so. See this paragraph to learn more

It tries to be a Jedi, but currently it's only a padawan :)

Plugins for editors

  1. Vim
  2. Neovim
  3. Sublime Text: Padawan for ST3 and SublimePHPCompanion

If you wish to write your own plugin, vim plugin example may serve as a source of inspiration. Look at wiki page for some documentation. You are welcome to open an issue if you have any questions.

Demo videos

Watch this short videos to see what it can already do(image is clickable) ScreenShot ScreenShot

How to use

  • Install padawan.php through composer:
$ composer global require mkusher/padawan
  • Add composer global bin to your $PATH:
PATH=$PATH:$HOME/.composer/vendor/bin
  • Install plugin for your editor.
  • Run index generation command in your php composer project folder:
padawan generate
  • Start padawan's server
padawan-server
  • Enjoy smart completion

Check out how to do this in the plugin documentation for specific editor above.

Plugins(extensions) for padawan.php

Padawan.php can be extended by plugins, there are:

  • Symfony2 plugin
  • PHP-DI plugin

Look at full plugins list

Why not the original plugin

This project was inspired by phpcomplete-extended by M2mdas and started as a fork with a completely rewritten index generation part. But as of now it is a completely new project with different design principles

M2mdas's plugin is pretty good, but has some core bugs due to self-written parser:

  • It does not support files with 2 or more classes in it
  • It fails on parsing RabbitMQ classes and many others
  • So it has some design faults and needs a global plugin redesign
  • It is ill-suited for adding assignment parsing
  • It is vim-only and is written in VimScript

So, I decided to create my own project.

Note

Install igbinary PHP extension to get optimized index file size and load speed.

Roadmap

Now in progress:

  • Implement go to definition, go to assingment, show documentation
  • Add plugins for editors(emacs, atom and etc.)
  • Extend type guessing(process classes' contructors, class doc-comment, foreach loops)
  • Implement index updating

License

MIT licensed.

Acknowledgements

This plugin would not have been possible without the works of Nikita Popov on his amazing PHP-Parser, React team on their http server, M2mdas, Dave Halter and many others.

About

php intelligent code completion http server

mkusher.name/padawan/

Resources

Readme
MIT license
Activity
Custom properties

Stars

250 stars

Watchers

17 watching

Forks

29 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.