lang/php: basic :lookup support & don't warn about missing phpctags

Only adds :documentation support for now.
This commit is contained in:
Henrik Lissner 2018-01-28 21:36:42 -05:00
parent 45a490882f
commit 15da107e04
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -13,9 +13,12 @@
:config :config
(add-hook! php-mode #'(ac-php-core-eldoc-setup flycheck-mode)) (add-hook! php-mode #'(ac-php-core-eldoc-setup flycheck-mode))
;; Disable HTML compatibility in php-mode. `web-mode' has superior support for
;; php+html. Use the .phtml
(setq php-template-compatibility nil) (setq php-template-compatibility nil)
(set! :repl 'php-mode #'php-boris) (set! :repl 'php-mode #'php-boris)
(set! :lookup 'php-mode :documentation #'php-search-documentation)
;; ac-php provides custom autocompletion, php-extras provides autocompletion ;; ac-php provides custom autocompletion, php-extras provides autocompletion
;; for built-in libraries ;; for built-in libraries
@ -82,10 +85,7 @@
(def-package! company-php (def-package! company-php
:when (featurep! :completion company) :when (featurep! :completion company)
:commands (company-ac-php-backend ac-php-remake-tags ac-php-remake-tags-all ac-php-core-eldoc-setup) :commands (company-ac-php-backend ac-php-remake-tags ac-php-remake-tags-all ac-php-core-eldoc-setup)
:config :config (setq ac-php-tags-path (concat doom-cache-dir "ac-php/")))
(unless (executable-find "phpctags")
(warn "php-mode: phpctags isn't installed, auto-completion will be gimped"))
(setq ac-php-tags-path (concat doom-cache-dir "ac-php/")))
;; ;;