Open MagicRB opened 4 years ago
I now understand lisp better and with this bit of lisp, TRAMP is fully functional if a bit slow
(lsp-register-client
(make-lsp-client :new-connection (lsp-tramp-connection 'lsp-metals--server-command)
:major-modes '(scala-mode)
:priority -1
:initialization-options '((decorationProvider . t)
(didFocusProvider . t)
(executeClientCommandProvider . t)
(doctorProvider . "html")
(statusBarProvider . "on")
(debuggingProvider . t)
(treeViewProvider . t))
:notification-handlers (ht ("metals/executeClientCommand" #'lsp-metals--execute-client-command)
("metals/publishDecorations" #'lsp-metals--publish-decorations)
("metals/treeViewDidChange" #'lsp-metals-treeview--did-change)
("metals-model-refresh" #'lsp-metals--model-refresh)
("metals/status" #'lsp-metals--status-string))
:action-handlers (ht ("metals-debug-session-start" (-partial #'lsp-metals--debug-start :json-false))
("metals-run-session-start" (-partial #'lsp-metals--debug-start t)))
:server-id 'metals
:remote? t
:initialized-fn (lambda (workspace)
(lsp-metals--add-focus-hooks)
(with-lsp-workspace workspace
(lsp--set-configuration
(lsp-configuration-section "metals"))))
:after-open-fn (lambda ()
(add-hook 'lsp-on-idle-hook #'lsp-metals--did-focus nil t))
:completion-in-comments? t))```
Describe the bug lsp-metals doesn't work with projects over TRAMP
To Reproduce open a .scala file over TRAMP and eval this lisp code
Expected behavior lsp-metals should work as if it was running on a local buffer.
Logs
This log was captured after a initial tramp connection was already established, but after resetting i got just more of the same
Note I'm sure lsp-metals worked on the remote computer as i just transformed it into a headless workstation