Created
September 14, 2018 04:54
-
-
Save sebasmonia/9e0c30101ca07a2061e2f5f8569a3434 to your computer and use it in GitHub Desktop.
Initial setup for lsp-python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; 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