Passing config for Intelephense PHP #1365
-
I am not quite sure this is a bug, so I opened a discussion instead. I use eglot with php Reproduction recipe
(use-package eglot
:ensure t
:config
(with-eval-after-load 'eglot
(setq completion-category-defaults nil)
(add-to-list 'eglot-server-programs
'((php-mode web-mode)
. ("intelephense" "--stdio" :initializationOptions
(:globalStoragePath "/home/kev/.tmp")))) This works perfectly.
(setq-default eglot-workspace-configuration
'((:intelephense . ((diagnostics.enable nil)))))
The issueThe lsp is still reporting diagnostic errors despite passing the config to switch it off. CombinationsI have tried various combinations for eglot-workspace-configuration, for example: (setq-default eglot-workspace-configuration
'((:intelephense . (:diagnostics . (enable nil))))) How do I do this properly for PHP/Intelephense? The json verson of the config would look like this: {
"intelephense.diagnostics.enable": true,
} |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Go into the Eglot events buffer, which in very recent versions reports communication in its final JSON format, and find the place where Eglot sends over this info to the server. Then paste it here. Refer to the manual for how to reach that buffer. You may have too many dots in your Elisp, it's supposed to be a plist. |
Beta Was this translation helpful? Give feedback.
Nice. The event buffer gives some very valuable insights. I fixed it.
There were two things wrong:
nil
for false. Reading over the docs again I saw that:json-false
translates tofalse
. Andnil
translated tonull
in json. Question, why not stick tot
andnil
?Thanks @joaotavora , great lsp.