Skip to content
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

refactor(ess): update ess module #6455

Draft
wants to merge 19 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat(ess): add lsp-mode client for TRAMP projects
  • Loading branch information
maikol-solis committed Jan 13, 2025
commit 8ff8b523758c005e0e84d4130df65d1d29ee8858
15 changes: 15 additions & 0 deletions modules/lang/ess/config.el
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,21 @@
(when (modulep! +tree-sitter)
(add-hook 'ess-r-mode-local-vars-hook #'tree-sitter! 'append))

;; WAIT lsp-mode over TRAMP needs manual configuration, and still it doesn't
;; work (see https://github.com/emacs-lsp/lsp-mode/issues/3579). In eglot
;; remote buffers should work out the box.
;;
;; The problem and the fix it is already known by the lsp-mode devs. So we
;; must be patient. The expected configuration should be something like this:

(after! lsp-mode
(lsp-register-client
(make-lsp-client
:new-connection (lsp-stdio-connection '("R" "--slave" "-e" "languageserver::run()"))
:major-modes '(ess-r-mode)
:remote? t
:server-id 'lsp-r-remote)))
Comment on lines +58 to +71
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With lsp-auto-register-remote-clients added (and set to t by default) in emacs-lsp/lsp-mode@d45aca0, is this needed anymore?


(set-repl-handler! 'ess-r-mode #'+ess/open-r-repl)
(set-repl-handler! 'ess-julia-mode #'+ess/open-julia-repl)
(set-lookup-handlers! '(ess-r-mode ess-julia-mode)
Expand Down