all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Help with LSP-Mode for PHP with Intelephense
@ 2022-03-22 17:45 Cheshire Yang
  2022-03-22 19:21 ` Emanuel Berg via Users list for the GNU Emacs text editor
  2022-03-23  6:11 ` tomas
  0 siblings, 2 replies; 6+ messages in thread
From: Cheshire Yang @ 2022-03-22 17:45 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org

Hi all,

I need help setting up emacs as a PHP IDE. I'm using Emacs 27 on NixOS.

First, it should be noted that MELPA works for me _very_ inconsistently, though the configuration and everything looks fine. I was not able to connect to MELPA today, so I cloned lsp-mode repository from github into .emacs.d/ and loaded it in the init file. So now, I can open a PHP file and M-x lsp-mode with success. I also installed Intelephense on the operating system, through the OS package manager (nix), and confirmed that I can type `intelephense` into a terminal and the command is available.

When I run `M-x lsp` to start the server however, I get a strange error. This is the output with toggle debug on error:

Debugger entered--Lisp error: (void-function -andfn)
  (-andfn #'lsp--supports-buffer\? #'lsp--server-binary-present\?)
  (lsp--filter-clients (-andfn #'lsp--supports-buffer\? #'lsp--server-binary-present\?))
  (let (clients (matching-clients (lsp--filter-clients (-andfn #'lsp--supports-buffer\? #'lsp--server-binary-present\?)))) (cond (matching-clients (if (setq lsp--buffer-workspaces (or (and (not ...) (lsp--tr$
  (progn (let (clients (matching-clients (lsp--filter-clients (-andfn #'lsp--supports-buffer\? #'lsp--server-binary-present\?)))) (cond (matching-clients (if (setq lsp--buffer-workspaces (or (and ... ...) (l$
  (if (buffer-file-name) (progn (let (clients (matching-clients (lsp--filter-clients (-andfn #'lsp--supports-buffer\? #'lsp--server-binary-present\?)))) (cond (matching-clients (if (setq lsp--buffer-workspac$
  lsp(nil)
  funcall-interactively(lsp nil)
  call-interactively(lsp record nil)
  command-execute(lsp record)
  execute-extended-command(nil "lsp" "lsp")
  funcall-interactively(execute-extended-command nil "lsp" "lsp")
  call-interactively(execute-extended-command nil nil)
  command-execute(execute-extended-command)

I have no clue what any of that means. Any and all help would be greatly appreciated. Unfortunately, the official docs on lsp-mode and intelephense are not useful.

Thank you,

C. Yang


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Help with LSP-Mode for PHP with Intelephense
  2022-03-22 17:45 Help with LSP-Mode for PHP with Intelephense Cheshire Yang
@ 2022-03-22 19:21 ` Emanuel Berg via Users list for the GNU Emacs text editor
  2022-03-24  0:00   ` Yuchen Pei
  2022-03-23  6:11 ` tomas
  1 sibling, 1 reply; 6+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-03-22 19:21 UTC (permalink / raw)
  To: help-gnu-emacs

Cheshire Yang wrote:

> I need help setting up emacs as a PHP IDE. I'm using Emacs
> 27 on NixOS.

Emacs should already offer a PHP IDE, but other than that cool
combo :)

> First, it should be noted that MELPA works for me _very_
> inconsistently, though the configuration and everything
> looks fine. I was not able to connect to MELPA today

What exactly did you do, error message etc?

> When I run `M-x lsp` to start the server however, I get
> a strange error. This is the output with toggle debug on
> error:
>
> Debugger entered--Lisp error: (void-function -andfn)
>   (-andfn #'lsp--supports-buffer\? #'lsp--server-binary-present\?)
>   (lsp--filter-clients (-andfn #'lsp--supports-buffer\?
> #'lsp--server-binary-present\?))
>   (let (clients (matching-clients (lsp--filter-clients (-andfn
> #'lsp--supports-buffer\? #'lsp--server-binary-present\?))))
> (cond (matching-clients (if (setq lsp--buffer-workspaces (or
> (and (not ...) (lsp--tr$
>   (progn (let (clients (matching-clients (lsp--filter-clients
> (-andfn #'lsp--supports-buffer\?
> #'lsp--server-binary-present\?)))) (cond (matching-clients (if
> (setq lsp--buffer-workspaces (or (and ... ...) (l$
>   (if (buffer-file-name) (progn (let (clients
> (matching-clients (lsp--filter-clients (-andfn
> #'lsp--supports-buffer\? #'lsp--server-binary-present\?))))
> (cond (matching-clients (if (setq lsp--buffer-workspac$
>   lsp(nil)
>   funcall-interactively(lsp nil)
>   call-interactively(lsp record nil)
>   command-execute(lsp record)
>   execute-extended-command(nil "lsp" "lsp")
>   funcall-interactively(execute-extended-command nil "lsp" "lsp")
>   call-interactively(execute-extended-command nil nil)
>   command-execute(execute-extended-command)
>
> I have no clue what any of that means

Me neither ... what is the server and "Intelephense"
you mention?

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Help with LSP-Mode for PHP with Intelephense
  2022-03-22 17:45 Help with LSP-Mode for PHP with Intelephense Cheshire Yang
  2022-03-22 19:21 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2022-03-23  6:11 ` tomas
  1 sibling, 0 replies; 6+ messages in thread
From: tomas @ 2022-03-23  6:11 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 1169 bytes --]

On Tue, Mar 22, 2022 at 05:45:47PM +0000, Cheshire Yang wrote:
> Hi all,
> 
> I need help setting up emacs as a PHP IDE. I'm using Emacs 27 on NixOS.
> 
> First, it should be noted that MELPA works for me _very_ inconsistently, though the configuration and everything looks fine. I was not able to connect to MELPA today, so I cloned lsp-mode repository from github into .emacs.d/ and loaded it in the init file. So now, I can open a PHP file and M-x lsp-mode with success. I also installed Intelephense on the operating system, through the OS package manager (nix), and confirmed that I can type `intelephense` into a terminal and the command is available.
> 
> When I run `M-x lsp` to start the server however, I get a strange error. This is the output with toggle debug on error:
> 
> Debugger entered--Lisp error: (void-function -andfn)

That means that some "-andfn" is missing. My hunch is that this is
part of "dash.el", a collection of functional-style bells-and-whistles.
Probably you need to install that (watch out: perhaps lsp-mode has
other dependencies you need to install).

Dash.el would be available through (m)elpa.

Cheers
-- 
t

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Help with LSP-Mode for PHP with Intelephense
  2022-03-22 19:21 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2022-03-24  0:00   ` Yuchen Pei
  2022-03-24  0:48     ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 6+ messages in thread
From: Yuchen Pei @ 2022-03-24  0:00 UTC (permalink / raw)
  To: help-gnu-emacs

On Tue 2022-03-22 20:21:46 +0100, Emanuel Berg via Users list for the GNU Emacs text editor wrote:

>
> Me neither ... what is the server and "Intelephense"
> you mention?

Intelephense is a proprietary php language server.  There are free ones
like phpactor and serenata which I have yet to get to work with eglot.

Best,
Yuchen

-- 
PGP Key: 47F9 D050 1E11 8879 9040  4941 2126 7E93 EF86 DFD0
          <https://ypei.org/assets/ypei-pubkey.txt>



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Help with LSP-Mode for PHP with Intelephense
  2022-03-24  0:00   ` Yuchen Pei
@ 2022-03-24  0:48     ` Emanuel Berg via Users list for the GNU Emacs text editor
  2022-03-28 14:28       ` Stefan Monnier via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 6+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-03-24  0:48 UTC (permalink / raw)
  To: help-gnu-emacs

Yuchen Pei wrote:

>> Me neither ... what is the server and "Intelephense"
>> you mention?
>
> Intelephense is a proprietary php language server.

Okay, what's a language server then?

> There are free ones like phpactor and serenata which I have
> yet to get to work with eglot.

OK so 0/3 PHP language servers are in the Debian repos what
I can see ...

I like the phpactor name!

Also I've never heard of eglot which also isn't in the repos ...

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Help with LSP-Mode for PHP with Intelephense
  2022-03-24  0:48     ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2022-03-28 14:28       ` Stefan Monnier via Users list for the GNU Emacs text editor
  0 siblings, 0 replies; 6+ messages in thread
From: Stefan Monnier via Users list for the GNU Emacs text editor @ 2022-03-28 14:28 UTC (permalink / raw)
  To: help-gnu-emacs

> Also I've never heard of eglot which also isn't in the repos ...

https://elpa.gnu.org/packages/eglot.html


        Stefan




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-03-28 14:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-22 17:45 Help with LSP-Mode for PHP with Intelephense Cheshire Yang
2022-03-22 19:21 ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-03-24  0:00   ` Yuchen Pei
2022-03-24  0:48     ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-03-28 14:28       ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-03-23  6:11 ` tomas

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.