forked from FG42/FG42
Python lsp integration has been added
This commit is contained in:
parent
26923c8c9b
commit
c5cc5430b3
|
@ -25,6 +25,9 @@
|
||||||
(with-ability cython-editor
|
(with-ability cython-editor
|
||||||
(depends-on 'cython-mode))
|
(depends-on 'cython-mode))
|
||||||
|
|
||||||
|
(with-ability lsp-python
|
||||||
|
(depends-on 'lsp-python-ms))
|
||||||
|
|
||||||
;; Extension -------------------------------------
|
;; Extension -------------------------------------
|
||||||
(extension python
|
(extension python
|
||||||
:version "2.31"
|
:version "2.31"
|
||||||
|
|
|
@ -142,18 +142,20 @@
|
||||||
'("\\.pyi\\'" . cython-mode))
|
'("\\.pyi\\'" . cython-mode))
|
||||||
(add-to-list 'auto-mode-alist
|
(add-to-list 'auto-mode-alist
|
||||||
'("\\.pyx\\'" . cython-mode)))
|
'("\\.pyx\\'" . cython-mode)))
|
||||||
(with-ability lsp
|
(ability lsp-python ()
|
||||||
;; Instruct LSP to use pyls
|
;; 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)
|
(ability python-code-completion ('code-completion)
|
||||||
|
|
Loading…
Reference in New Issue