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 55413ea9fb
ci/woodpecker/push/woodpecker Pipeline failed Details
Implement basic support for function indexation and include dirs
Does not yet include support for imported namespaced functions
1 year ago
benchmarks Optimize splay tree and use it to store token's children 1 year ago
test Implement basic support for function indexation and include dirs 1 year ago
.gitignore Fix some compilation warnings 1 year ago
.woodpecker.yml Another attempt at fixing CI 2 years ago
COPYING Add license information 3 years ago
Cask Add Cask configuration and fix some compilation warnings 1 year ago
Makefile Add Cask configuration and fix some compilation warnings 1 year ago
README.md Transition from index script to autoloader 2 years ago
phpinspect-autoload.el Remove `phpinspect-define-pipeline-step' in favor of direct fun call 1 year ago
phpinspect-bmap.el Add factilities to filter logs from different modules 1 year ago
phpinspect-buffer.el Fix all remaining byte compiler warnings 1 year ago
phpinspect-cache.el Implement basic support for function indexation and include dirs 1 year ago
phpinspect-changeset.el Add Cask configuration and fix some compilation warnings 1 year ago
phpinspect-class.el Implement eldoc for object attributes 1 year ago
phpinspect-completion.el Implement basic support for function indexation and include dirs 1 year ago
phpinspect-edtrack.el Remove faulty edit tracker code based on wrong deduction 1 year ago
phpinspect-eldoc.el Implement basic support for function indexation and include dirs 1 year ago
phpinspect-fs.el Make project indexation asynchronous using `phpinspect-pipeline' 1 year ago
phpinspect-imports.el Fix all remaining byte compiler warnings 1 year ago
phpinspect-index.el Implement basic support for function indexation and include dirs 1 year ago
phpinspect-meta.el Reimplement `phpinspect-fix-imports' using metadata objects 1 year ago
phpinspect-parse-context.el Add Cask configuration and fix some compilation warnings 1 year ago
phpinspect-parser.el Fix all remaining byte compiler warnings 1 year ago
phpinspect-pipeline.el Implement basic support for function indexation and include dirs 1 year ago
phpinspect-project.el Implement basic support for function indexation and include dirs 1 year ago
phpinspect-queue.el Implement async processing pipeline 1 year ago
phpinspect-resolve.el Move more functionalities from main file to separate modules 1 year ago
phpinspect-resolvecontext.el Fix some compilation warnings 1 year ago
phpinspect-serialize.el Implement Incremental Parsing 1 year ago
phpinspect-splayt.el Fix all remaining byte compiler warnings 1 year ago
phpinspect-suggest.el Implement basic support for function indexation and include dirs 1 year ago
phpinspect-type.el Implement basic support for function indexation and include dirs 1 year ago
phpinspect-util.el Implement basic support for function indexation and include dirs 1 year ago
phpinspect-worker.el Implement basic support for function indexation and include dirs 1 year ago
phpinspect.el Implement basic support for function indexation and include dirs 1 year 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