Document (non-)compatibility with web-mode
PhilHudson opened this issue · comments
Can you use ac-php in web-mode? If so, how? I think we should be told. Thanks.
(add-hook 'web-mode-hook
'(lambda ()
;; Enable auto-complete-mode
(auto-complete-mode t)
(require 'ac-php)
(setq ac-sources '(ac-source-php))
;; As an example (optional)
(yas-global-mode 1)
;; Enable ElDoc support (optional)
(ac-php-core-eldoc-setup)
;; Jump to definition (optional)
(define-key web-mode-map (kbd "M-]")
'ac-php-find-symbol-at-point)
;; Return back (optional)
(define-key web-mode-map (kbd "M-[")
'ac-php-location-stack-back)))
Thanks very much.
I can't say why, but after some trial and error, I determined that this* caused mouse-1 and mouse-2 to output M-] and M-[ for somereason in spacemacs. This caused control character strings to be written to buffer.
(define-key web-mode-map (kbd "M-]")
'ac-php-find-symbol-at-point)
;; Return back (optional)
(define-key web-mode-map (kbd "M-[")
'ac-php-location-stack-back)