Open Lenbok opened 17 hours ago
If anyone wants to play along, here's my emacs nextflow use-package
declaration that attempts to set up this server under both eglot
and lsp-mode
language server clients. (They call via a bash wrapper script nextflow-language-server
that just calls java -jar
on the language server jarfile I downloaded from this repo).
(use-package nextflow-mode
:ensure (nextflow-mode :host github :repo "edmundmiller/nextflow-mode" :branch "master")
:config
(with-eval-after-load 'eglot
(add-to-list 'eglot-server-programs
'(nextflow-mode . ("nextflow-language-server"))))
(with-eval-after-load 'lsp-mode
(defvar lsp-nextflow-server-command '("nextflow-language-server"))
(lsp-register-client
(make-lsp-client
:new-connection (lsp-stdio-connection (lambda () lsp-nextflow-server-command))
:major-modes '(nextflow-mode)
:multi-root t
:server-id 'nextflow-lsp))
(add-to-list 'lsp-language-id-configuration '(nextflow-mode . "nextflow"))
(lsp-consistency-check lsp-nextflow)))
Tagging @edmundmiller since he is also trying to set up the language client for emacs
Ooo!
I've got the lsp-mode download working with the vsix from the other repo. I think we can combine these and make a PR
We could probably use this repo, but it would need CI set up and no guarantee the release numbers stay in sync.
Whatever @bentsherman thinks we should rely on.
We can set up a repo in the nextflow-io org for you to collaborate
In terms of lsp-mode
(which is the "batteries included" emacs language client), I see @edmundmiller has a fork where he's working on adding that (https://github.com/emacs-lsp/lsp-mode/compare/master...edmundmiller:lsp-mode:master). He should be able to open a PR directly against upstream lsp-mode
. (I think it should be able to download the language server jar from this repo's releases rather than the vscode vsix
).
I think rather than needing another repo, what is needed is documentation in this repo on what configuration is required/accepted when using other clients, plus testing/debugging against other language clients (and either fixing issues here or in the repos of those other clients).
I tried to connect this language server up in emacs, using
lsp-mode
, and communication is established between the client and server fine. However when editing one of the examples in the nextflow-patterns repo, my lsp client sends various messages to the server but nothing of interest comes back.What configuration settings does the language server expect?
e.g., when I trace the server initialization, I get:
but e.g. jump to definition requests come back empty: