forked from FG42/FG42
1
0
Fork 0

Python lsp integration has been added

This commit is contained in:
Sameer Rahmani 2019-12-09 11:26:09 +00:00
parent 26923c8c9b
commit c5cc5430b3
2 changed files with 16 additions and 11 deletions

View File

@ -25,6 +25,9 @@
(with-ability cython-editor
(depends-on 'cython-mode))
(with-ability lsp-python
(depends-on 'lsp-python-ms))
;; Extension -------------------------------------
(extension python
:version "2.31"

View File

@ -142,18 +142,20 @@
'("\\.pyi\\'" . cython-mode))
(add-to-list 'auto-mode-alist
'("\\.pyx\\'" . cython-mode)))
(with-ability lsp
;; Instruct LSP to use pyls
(ability lsp-python ()
;; Instruct LSP to use pyls
(require 'lsp-python-ms)
;; (lsp-register-client
;; (make-lsp-client :new-connection (lsp-stdio-connection "pyls")
;; :major-modes '(python-mode)
;; :server-id 'pyls))
;; Setup LSP for python mode
(add-hook 'python-mode-hook
(lambda ()
(push 'company-lsp company-backends)
(lsp)
(setq lsp-ui-sideline-show-code-actions nil)))))
(lsp-register-client
(make-lsp-client :new-connection (lsp-stdio-connection "pyls")
:major-modes '(python-mode)
:server-id 'pyls))
;; Setup LSP for python mode
(add-hook 'python-mode-hook
(lambda ()
(push 'company-lsp company-backends)
(lsp)))))
(ability python-code-completion ('code-completion)