All Projects β†’ emacs-php β†’ ede-php-autoload

emacs-php / ede-php-autoload

Licence: other
PHP autoloading simulation for Emacs' Semantic

Programming Languages

emacs lisp
2029 projects
Gherkin
971 projects
PHP
23972 projects - #3 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to ede-php-autoload

emacs-jest
A package to run jest inside emacs
Stars: ✭ 74 (+221.74%)
Mutual labels:  emacs-modules, emacs-packages
cask-package-toolset.el
πŸ›  Toolsettize your emacs package! πŸ› 
Stars: ✭ 30 (+30.43%)
Mutual labels:  emacs-packages
Org Msg
OrgMsg is a GNU/Emacs global minor mode mixing up Org mode and Message mode to compose and reply to emails in a Outlook HTML friendly style.
Stars: ✭ 153 (+565.22%)
Mutual labels:  emacs-packages
move-border
Emacs windows resizing made intuitive
Stars: ✭ 16 (-30.43%)
Mutual labels:  emacs-modules
Super Save
Save Emacs buffers when they lose focus
Stars: ✭ 184 (+700%)
Mutual labels:  emacs-packages
dired-rsync
Support for rsync from Emacs dired buffers
Stars: ✭ 93 (+304.35%)
Mutual labels:  emacs-packages
Mode Icons
Show icons instead of mode names
Stars: ✭ 140 (+508.7%)
Mutual labels:  emacs-packages
modern-sh
🎸 An Emacs minor mode for editing shell script.
Stars: ✭ 27 (+17.39%)
Mutual labels:  emacs-packages
epkg
Browse the Emacsmirror package database
Stars: ✭ 45 (+95.65%)
Mutual labels:  emacs-packages
pdfgrep
PDFGrep is a GNU/Emacs module providing grep comparable facilities but for PDF files
Stars: ✭ 24 (+4.35%)
Mutual labels:  emacs-modules
Academic Phrases
Bypass that mental block when writing your papers.
Stars: ✭ 244 (+960.87%)
Mutual labels:  emacs-packages
Evil Snipe
2-char searching ala vim-sneak & vim-seek, for evil-mode
Stars: ✭ 196 (+752.17%)
Mutual labels:  emacs-packages
Uncledavesemacs
My personal ~/.emacs.d
Stars: ✭ 204 (+786.96%)
Mutual labels:  emacs-packages
Emacs Vdiff
Like vimdiff for Emacs
Stars: ✭ 165 (+617.39%)
Mutual labels:  emacs-packages
dired-toggle
Show dired as sidebar and will not create new buffers when changing directory
Stars: ✭ 23 (+0%)
Mutual labels:  emacs-packages
Borg
Assimilate Emacs packages as Git submodules
Stars: ✭ 145 (+530.43%)
Mutual labels:  emacs-packages
load-bash-alias
Convert bash aliases into eshell ones
Stars: ✭ 16 (-30.43%)
Mutual labels:  emacs-packages
emacs-bind-map
Bind personal keymaps in multiple locations
Stars: ✭ 55 (+139.13%)
Mutual labels:  emacs-packages
gnuplot-mode
An emacs major mode for editing gnuplot scripts.
Stars: ✭ 29 (+26.09%)
Mutual labels:  emacs-packages
emacs2nix
Automatically generate Nix expressions for Emacs packages
Stars: ✭ 23 (+0%)
Mutual labels:  emacs-packages

ede-php-autoload

http://melpa.org/packages/ede-php-autoload-badge.svg http://stable.melpa.org/packages/ede-php-autoload-badge.svg https://travis-ci.org/emacs-php/ede-php-autoload.svg

Description

This project simulates PHP autoloading system to use it in Semantic. It is composed of 3 parts:

  • An EDE project, ede-php-autoload, that defines autoloading configuration for a project. It is able to parse composer.json files to extract autoloading information from it
  • A SemanticDB backend that can find a tag by name using the autoload information of the current ede-php-autoload project
  • A minor mode, ede-php-autoload-mode, that enables the SemanticDB backend for a buffer.

Defining autoloads for a project

Let’s assume we have a project located at /home/me/my-project. It has 3 namespaces:

  • MyFirstNs, located at src/MyFirstNs, and uses the PSR-0 norm
  • MySecondNs, located at src/MySecondNs, and uses the PSR-4 norm
  • ThirdPartyNs, located at vendor/third-party/src, and uses the PSR-4 norm

Defining this project and its autoload information is done like this:

(ede-php-autoload-project "My project"
                          :file "/home/me/my-project/main.php"
                          :class-autoloads '(:psr-0 (("MyFirstNs" . "src/MyFirstNs"))
                                             :psr-4 (("MySecondNs" . "src/MySecondNs")
                                                     ("ThirdPartyNs" . "vendor/third-party/src"))))

If you have a composer.json at the root of your project, its autoload information (and also the one in the composer dependencies) will be merged with the information you put in :class-autoloads.

If your composer.json contains all the autoload information, and you have nothing to add in :class-autoloads, you don’t have to define an EDE project by hand. It will be automatically created when you visit a file in your project.

Enabling the SemanticDB backend in php buffers

(add-hook 'php-mode-hook #'ede-php-autoload-mode)

Commands

NameDescription
M-x ede-php-autoload-reload-autoloadsSimilar to the reindexation in IDEs. Use it when your composer configuration changed to reload the autoloads.

License

This project is released under the GPL v3 license. See GPL for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].