Ive set up remote lsp-mode with tramp and pylsp server. While the server does start when I open a remote py file, many server features such as auto completions, code format, references dont work.

Here is my setup

  (require 'use-package))

(use-package lsp-mode
    :hook (python-mode . lsp)
   (make-lsp-client :new-connection (lsp-tramp-connection "pylsp")
                    :major-modes '(python-mode)
                    :remote? t
                    :server-id 'pyls-remote)))

;; Set tramp remote path
(add-to-list 'load-path "/usrlocal/share/emacs/site-lisp/")
(require 'tramp)
(add-to-list 'Info-directory-list "/usr/local/share/info/")
(add-to-list 'tramp-remote-path "~/envs/general/bin")
(add-to-list 'tramp-remote-path 'tramp-own-remote-path)

(use-package company
  :ensure t
  :diminish company-mode
  :hook (prog-mode . global-company-mode)
  :commands (company-mode company-indent-or-complete-common)

1 Answer 1


Oh there's a typo

(add-to-list 'load-path "/usrlocal/share/emacs/site-lisp/")

should be (add-to-list 'load-path "/usr/local/share/emacs/site-lisp/")

Cant believe I spent 40+ hours debugging this

  • we've all been there
    – nega
    Oct 19, 2021 at 6:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.