Skip to content

Instantly share code, notes, and snippets.

@sebasmonia
Created September 14, 2018 04:54
Show Gist options
  • Save sebasmonia/9e0c30101ca07a2061e2f5f8569a3434 to your computer and use it in GitHub Desktop.
Save sebasmonia/9e0c30101ca07a2061e2f5f8569a3434 to your computer and use it in GitHub Desktop.
Initial setup for lsp-python
;; LSP MODE
;; from https://vxlabs.com/2018/06/08/python-language-server-with-emacs-and-lsp-mode/
(require 'lsp-mode)
(require 'lsp-ui)
(require 'lsp-imenu)
(add-hook 'lsp-after-open-hook 'lsp-enable-imenu)
(setq lsp-ui-sideline-ignore-duplicate t)
(add-hook 'lsp-mode-hook 'lsp-ui-mode)
(lsp-define-stdio-client lsp-python "python"
#'projectile-project-root
'("pyls"))
(add-hook 'python-mode-hook
(lambda ()
(lsp-python-enable)))
(eval-after-load
'company
'(add-to-list 'company-backends 'company-lsp))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment