-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What is needed to use this with other lsp clients? #43
Comments
If anyone wants to play along, here's my emacs nextflow (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 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). |
mason-org/mason-registry#7713 |
Are you saying there is one emacs language client that everyone uses to connect to all language servers? |
Yeah, isn't that how all of the editors do it? They have an implementation of a LSP client: for emacs there is a plugin that implements it, I also was trying to get the language server |
In vscode there is a typescript API that you use to connect vscode to the language server from a vscode extension. So there is no central repository for all vscode <-> language server integrations |
In emacs there is one language client ( I haven't used the groovy language server that this one is derived from, but it might be worth trying in order to see whether it also has similar difficulties with other clients. |
@Lenbok PR to lsp-mode emacs-lsp/lsp-mode#4606 and then all of the config I used to set it up personally https://github.com/edmundmiller/.doom.d/blob/b5ce985a5bc81629ce53b46fc950a6b47d807d24/modules/lang/nextflow/config.el |
@edmundmiller are you saying you have it actually working and jumping to definitions etc? |
Yep! I was mainly testing for formatting myself 😬 Give it a shot and let me know if anything isn't working! |
@edmundmiller Thanks, I was able to get the server working using your ;;; Directory Local Variables
;;; For more information see (info "(emacs) Directory Variables")
((nextflow-mode
(eglot-workspace-configuration
. (:nextflow (:files (:exclude [".git" ".nf-test" "work"])))))) @bentsherman Would you be able to document the configuration options the server knows about and what the defaults are? (Possibly even give the server a default value for the above files directive). |
@Lenbok I think it's listed out in the schema on the vscode repo. I ran
And in the neovim setup https://github.com/mason-org/mason-registry/blob/841ceaba936a1f18a927cb40ff303a3e8efd42ac/packages/nextflow-language-server/package.yaml#L20 |
@edmundmiller Neat, I didn't know about that ability to reverse engineer the server settings from the vscode |
Closing in favor of #56 |
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:
The text was updated successfully, but these errors were encountered: