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.
Hugo Thunnissen
098146bfc5
The resolvecontext will from now on be used as store for all data required to resolve the return type of a statement at any given point. `phpinspect--word-end-regex` has been altered to match words that are directly followed by other, "non-word" characters. `phpinspect-describe-handler` has been added to list and describe handlers during runtime. A bug has been fixed that made the parser interpret the "static" keyword inside functions as a class attribute in stead of just a word. Aside from the company backend, `phpinspect-eldoc-function` has been simplified and adapted to make use of the resolvecontext structure. The resolving of statment/variable types has been altered to make use of imperative loops in a couple of places for the sake of simplicity and optimization. |
3 years ago | |
---|---|---|
test | 3 years ago | |
.gitignore | 3 years ago | |
COPYING | 3 years ago | |
README.md | 3 years ago | |
phpinspect-index.bash | 3 years ago | |
phpinspect.el | 3 years ago |
README.md
phpinspect.el
WIP. Documentation is in the making.
Example config:
;;;###autoload
(defun my-php-personal-hook ()
(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-uses-interactive)
;; 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)
Development
Running tests
Tests are implemented using ert
. You can run them in batch mode with the following
command:
emacs -batch -l ert -l ./phpinspect.el -l ./test/phpinspect-test.el -f ert-run-tests-batch-and-exit