Closed otrocodigo closed 4 months ago
@otrocodigo the update to eglot to enable php-ts-mode was just recently added to emacs-29 branch https://debbugs.gnu.org/cgi/bugreport.cgi?bug=68870. It wasn't available in the build from 2023-09-11.
You should try adding in meantime:
(require 'eglot)
(add-to-list 'eglot-server-programs
'(php-ts-mode . ("phpactor" "language-server")))
For lsp-mode:
(require 'lsp-mode)
(add-to-list 'lsp-language-id-configuration '(php-ts-mode . "php"))
or use a melpa version of the lsp package from feb or later https://github.com/emacs-lsp/lsp-mode/pull/4318
Thank @piotrkwiecinski . I compiled version 30.0.50 and it seems to work fine php-ts-mode
+ eglot
I have a basic startup file, I just install
tree-sitter-php
and loadphp-ts-mode
.I open a *.php file and activate
eglot
withphpactor
as lsp.I position on some method and call
completion-at-point
but I don't get any suggestions.I repeat the steps with
php-mode
(not tree-sitter) and if I get suggestions.I tried with another lsp client like
lsp-mode
or lsp server likeintelephense
and the same thing happens: it works fine withphp-mode
but not withphp-ts-mode
.GNU Emacs 29.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.37, cairo version 1.16.0) of 2023-09-11, modified by Debian