#27 lsp-define-stdio-client undefined

Open
opened 1 week ago by chrbirks · 3 comments
chrbirks commented 1 week ago

Hi It seems that lsp-define-stdio-client for lsp-mode in Emacs is deprecated and has been completely removed. Your examples for lsp-mode in Emacs needs to be updated to use lsp-register-client instead.

I have managed to get the server started using the code below but for some reason the server status is stuck at "starting" status and never does any code checking. But I can see the server binary is running.

(add-hook 'vhdl-mode-hook #'lsp)
(add-to-list 'lsp-language-id-configuration '(vhdl-mode . "vhdl"))
(lsp-register-client
   (make-lsp-client :new-connection (lsp-stdio-connection '("<PATH>/vhdl-tool" "--config" "<PATH>/vhdltool-config.yaml" "server"))
                    :major-modes '(vhdl-mode)
                    :language-id "VHDL"
                    :server-id 'lsp-vhdl-mode))
Hi It seems that lsp-define-stdio-client for lsp-mode in Emacs is deprecated and has been completely removed. Your examples for lsp-mode in Emacs needs to be updated to use lsp-register-client instead. I have managed to get the server started using the code below but for some reason the server status is stuck at "starting" status and never does any code checking. But I can see the server binary is running. ``` (add-hook 'vhdl-mode-hook #'lsp) (add-to-list 'lsp-language-id-configuration '(vhdl-mode . "vhdl")) (lsp-register-client (make-lsp-client :new-connection (lsp-stdio-connection '("<PATH>/vhdl-tool" "--config" "<PATH>/vhdltool-config.yaml" "server")) :major-modes '(vhdl-mode) :language-id "VHDL" :server-id 'lsp-vhdl-mode)) ```
ezchi commented 1 week ago

I think you should use lsp instead of server for lsp-stdio-connection.

I got the LSP started but none of the LSP command works.

I think you should use `lsp` instead of `server` for `lsp-stdio-connection`. I got the LSP started but none of the LSP command works.
chrbirks commented 1 week ago
Poster

@ezchi: You are right. I can start and connect to the server now and lsp-describe-session shows that it supports finding references, definitions, etc.

But the --config parameter doesn't seem to make any difference. It expects a config file by the name vhdltool-config.yaml to be found in some(?) directory. If I place it so it can be found when opening one vhdl file the server cannot find it if opening a vhdl file in another location.

lsp-log

There is no configuration file (vhdltool-config.yaml) in the current directory
VHDL Language Server: no handler for. response {"jsonrpc":"2.0","id":1,"result":{"title":null}}
@ezchi: You are right. I can start and connect to the server now and `lsp-describe-session` shows that it supports finding references, definitions, etc. But the `--config` parameter doesn't seem to make any difference. It expects a config file by the name `vhdltool-config.yaml` to be found in some(?) directory. If I place it so it can be found when opening one vhdl file the server cannot find it if opening a vhdl file in another location. **lsp-log** ``` There is no configuration file (vhdltool-config.yaml) in the current directory VHDL Language Server: no handler for. response {"jsonrpc":"2.0","id":1,"result":{"title":null}} ```
chrbirks commented 6 days ago
Poster

Okay it seems that when starting the server with lsp the --config file path is ignored and it searches for vhdltool-config.yaml from the location of the opened vhdl file and up until it is found. So starting the server without --config seems to work without the previous error.

It passes errors to flycheck fine such as types not being found but signals declared but not assigned are not reported.

Okay it seems that when starting the server with `lsp` the `--config` file path is ignored and it searches for `vhdltool-config.yaml` from the location of the opened vhdl file and up until it is found. So starting the server without `--config` seems to work without the previous error. It passes errors to `flycheck` fine such as types not being found but signals declared but not assigned are not reported.
Sign in to join this conversation.
No Label
No Milestone
No assignee
2 Participants
Loading...
Cancel
Save
There is no content yet.