-
Notifications
You must be signed in to change notification settings - Fork 265
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
Add instructions for emacs with lsp-mode #3647
base: trunk
Are you sure you want to change the base?
Conversation
When I try to add this stuff to my emacs inititalization I get:
|
(use-package lsp-mode
) |
Now when I open a .u file I get this message:
|
As per the overall language server instructions, you do not start it as normal, just connect to it. So what I do is
This starts a Then open a |
Yeah, I still get this error whenever it tries to start lsp-mode in a .u buffer. even if ucm is running. lsp-mode DOES work for other language servers, and LSP is currently working for me with unison using vscode |
I ran into the same situation as stew when following the instructions in this PR. The approach shown below works in that I see type check errors, but the type information for local variables is not good (e.g. for the Unison hello world program, the use of the local variable (lsp-register-client
(make-lsp-client
:language-id "unisonlang"
:new-connection
(list
:connect (lambda (filter sentinel name _environment-fn _workspace)
(let* ((host "localhost")
(port 5757)
(tcp-proc (lsp--open-network-stream host port (concat name "::tcp"))))
(set-process-query-on-exit-flag tcp-proc nil)
(set-process-filter tcp-proc filter)
(set-process-sentinel tcp-proc sentinel)
(cons tcp-proc tcp-proc)))
:test? (lambda () t))
:major-modes '(unisonlang-mode)
:server-id 'unisonlang
)) |
I just put up #4922, which does this for Eglot instead of lsp-mode. Mostly because it’s simpler. |
Documentation change only