You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Go to file
Hugo Thunnissen 23245d0158
ci/woodpecker/push/woodpecker Pipeline failed Details
Fix some compilation warnings
10 months ago
benchmarks Optimize splay tree and use it to store token's children 10 months ago
test Use metadata tree instead of hash table for token lookup 10 months ago
.gitignore Fix some compilation warnings 10 months ago
.woodpecker.yml Another attempt at fixing CI 1 year ago
COPYING Add license information 3 years ago
README.md Transition from index script to autoloader 2 years ago
phpinspect-autoload.el Move more functionalities from main file to separate modules 10 months ago
phpinspect-bmap.el Fix some compilation warnings 10 months ago
phpinspect-buffer.el Make buffer re-parse non-interruptible + add interactive function to view tree 10 months ago
phpinspect-cache.el Refactor phpinspect--project to phpinspect-project 11 months ago
phpinspect-class.el Implement eldoc for object attributes 10 months ago
phpinspect-completion.el Use metadata tree instead of hash table for token lookup 10 months ago
phpinspect-edtrack.el Fix some compilation warnings 10 months ago
phpinspect-eldoc.el Use metadata tree instead of hash table for token lookup 10 months ago
phpinspect-fs.el Make file contents insertion asynchronous in background threads 11 months ago
phpinspect-imports.el Remove obsolete comment (incremental parsing has been implemented) 10 months ago
phpinspect-index.el Implement strategy pattern for completion backend 10 months ago
phpinspect-meta.el Fix some compilation warnings 10 months ago
phpinspect-parse-context.el Make parse context cancellable and restore state after interrupt 10 months ago
phpinspect-parser.el Make parse context cancellable and restore state after interrupt 10 months ago
phpinspect-project.el Fix some compilation warnings 10 months ago
phpinspect-queue.el Implement Incremental Parsing 10 months ago
phpinspect-resolve.el Move more functionalities from main file to separate modules 10 months ago
phpinspect-resolvecontext.el Fix some compilation warnings 10 months ago
phpinspect-serialize.el Implement Incremental Parsing 10 months ago
phpinspect-splayt.el Fix some compilation warnings 10 months ago
phpinspect-suggest.el Fix some compilation warnings 10 months ago
phpinspect-type.el Implement eldoc for object attributes 10 months ago
phpinspect-util.el Implement eldoc for object attributes 10 months ago
phpinspect-worker.el Implement Incremental Parsing 10 months ago
phpinspect.el Make parse context cancellable and restore state after interrupt 10 months ago

README.md

phpinspect.el

WIP. More documentation is in the making.

Example config

;;;###autoload
(defun my-php-personal-hook ()
  ;; It is important to enable `company-mode' before setting
  ;; the variables below.
  (company-mode)
  (setq-local company-minimum-prefix-length 0)
  (setq-local company-tooltip-align-annotations t)
  (setq-local company-idle-delay 0.1)
  (setq-local company-backends '(phpinspect-company-backend))

  ;; Shortcut to add use statements for classes you use.
  (define-key php-mode-map (kbd "C-c u") 'phpinspect-fix-imports)

  ;; Shortcuts to quickly search/open files of PHP classes.
  (global-set-key (kbd "C-c a") 'phpinspect-find-class-file)
  (global-set-key (kbd "C-c c") 'phpinspect-find-own-class-file)

  (phpinspect-mode))

(add-hook 'php-mode-hook #'my-php-personal-hook)

Install

git clone https://git.snorba.art/hugo/phpinspect.el ~/projects/phpinspect.el
(add-to-list 'load-path "~/projects/phpinspect.el")
(require 'phpinspect)

Development

Running tests

Tests are implemented using ert. You can run them in batch mode with the following command:

emacs -L ./ -batch -l ert -l ./phpinspect.el -l ./test/phpinspect-test.el -f ert-run-tests-batch-and-exit