Skip to content

Commit

Permalink
Add lsp-bridge
Browse files Browse the repository at this point in the history
  • Loading branch information
zonuexe committed Nov 14, 2022
1 parent e45bfae commit acf8f25
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lisp/php-ide.el
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
;; Does not launch any IDE features.
;; - eglot
;; https://github.com/joaotavora/eglot
;; - lsp-bridge
;; https://github.com/manateelazycat/lsp-bridge
;; - lsp-mode
;; https://emacs-lsp.github.io/lsp-mode/
;; https://github.com/emacs-lsp/lsp-mode
Expand Down Expand Up @@ -93,6 +95,7 @@
(require 'cl-lib)
(require 'php-ide-phpactor)
(defvar eglot-server-programs)
(declare-function lsp-bridge-mode "ext:lsp-bridge" ())
(declare-function eglot-ensure "ext:eglot" ())
(declare-function eglot--managed-mode-off "ext:eglot" ())
(declare-function phpactor--find-executable "ext:phpactor" ()))
Expand All @@ -107,6 +110,9 @@
(eglot :test (lambda () (and (require 'eglot nil t) (featurep 'eglot)))
:activate eglot-ensure
:deactivate eglot--managed-mode-off)
(lsp-bridge :test (lambda () (and (require 'lsp-bridge nil t) (featurep 'lsp-bridge)))
:activate (lambda () (lsp-bridge-mode +1))
:deactivate (lambda () (lsp-bridge-mode -1)))
(lsp-mode :test (lambda () (and (require 'lsp nil t) (featurep 'lsp)))
:activate lsp
:deactivate lsp-workspace-shutdown)))
Expand Down Expand Up @@ -166,7 +172,7 @@
(defun php-ide-turn-on ()
"Turn on PHP IDE-FEATURES and execute `php-ide-mode'."
(unless php-ide-features
(user-error "No PHP-IDE feature is installed. Install the lsp-mode, eglot or phpactor package"))
(user-error "No PHP-IDE feature is installed. Install the lsp-mode, lsp-bridge, eglot or phpactor package"))
(php-ide-mode +1))

(defun php-ide--activate-buffer (name ide-plist)
Expand Down

0 comments on commit acf8f25

Please sign in to comment.