Skip to content

Instantly share code, notes, and snippets.

@sai-prasanna
Last active April 25, 2019 13:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sai-prasanna/45a9d7e960fd0865b8466c1b8caba7e2 to your computer and use it in GitHub Desktop.
Save sai-prasanna/45a9d7e960fd0865b8466c1b8caba7e2 to your computer and use it in GitHub Desktop.
Make lsp autocomplete work in emacs over TRAMP
;; Put this in root directory of your project
;; Install pyls in the project environment
;; pip install python-language-server
((python-mode . ((eval . (progn (require 'lsp-mode)
(lsp-register-client
(make-lsp-client :new-connection (lsp-tramp-connection "~/miniconda3/envs/znlp/bin/pyls")
:major-modes '(python-mode)
:remote? t
:server-id 'remote-pyls))))
(eval . (setq lsp-clients-python-command '("~/miniconda3/envs/znlp/bin/pyls")))
)))
(
dotspacemacs-configuration-layers
'(lsp
(python :variables python-backend 'lsp)
;; other layers ...
)
)
(defun dotspacemacs/user-config ()
;; Other stuff..
;; TRAMP
(setq enable-remote-dir-locals t)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment