|
|
@ -198,6 +198,10 @@ There are two things you can do about this warning: |
|
|
|
;; Globally enable flycheck |
|
|
|
;; Globally enable flycheck |
|
|
|
(add-hook 'after-init-hook #'global-flycheck-mode) |
|
|
|
(add-hook 'after-init-hook #'global-flycheck-mode) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;; LSP |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(require 'lsp-mode) |
|
|
|
|
|
|
|
|
|
|
|
;;;;; PYTHON ;;;;;;;;;;;;;;;;;; |
|
|
|
;;;;; PYTHON ;;;;;;;;;;;;;;;;;; |
|
|
|
;; |
|
|
|
;; |
|
|
|
;; NOTES: |
|
|
|
;; NOTES: |
|
|
@ -256,6 +260,22 @@ There are two things you can do about this warning: |
|
|
|
(add-hook 'python-mode-hook (lambda () |
|
|
|
(add-hook 'python-mode-hook (lambda () |
|
|
|
(add-to-list 'company-backends 'company-jedi))) |
|
|
|
(add-to-list 'company-backends 'company-jedi))) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;; Use microsoft's python language server |
|
|
|
|
|
|
|
(require 'lsp-python-ms) |
|
|
|
|
|
|
|
(use-package lsp-python-ms |
|
|
|
|
|
|
|
:ensure t |
|
|
|
|
|
|
|
:init (setq lsp-python-ms-auto-install-server t) |
|
|
|
|
|
|
|
:hook (python-mode . (lambda () |
|
|
|
|
|
|
|
(require 'lsp-python-ms) |
|
|
|
|
|
|
|
(lsp)))) ; or lsp-deferred |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;; Add LSP to python mode |
|
|
|
|
|
|
|
(add-hook 'python-mode-hook #'lsp) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;; Python testing helpers |
|
|
|
|
|
|
|
(use-package python-pytest) |
|
|
|
|
|
|
|
|
|
|
|
;;-------------------------------------------------------------------------------------- |
|
|
|
;;-------------------------------------------------------------------------------------- |
|
|
|
;; Save hooks |
|
|
|
;; Save hooks |
|
|
|
;;-------------------------------------------------------------------------------------- |
|
|
|
;;-------------------------------------------------------------------------------------- |
|
|
@ -278,6 +298,9 @@ There are two things you can do about this warning: |
|
|
|
;; Switch windows with M-o |
|
|
|
;; Switch windows with M-o |
|
|
|
(global-set-key (kbd "M-o") 'other-window) |
|
|
|
(global-set-key (kbd "M-o") 'other-window) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;; Bind pytest in python mode to M-p |
|
|
|
|
|
|
|
(define-key python-mode-map (kbd "M-p") 'python-pytest-file) |
|
|
|
|
|
|
|
|
|
|
|
;; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lisp Binds ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
|
|
;; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lisp Binds ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
|
|
|
|
|
|
|
|
|
|
;; Note: SLIME bindings require slime to be running. |
|
|
|
;; Note: SLIME bindings require slime to be running. |
|
|
|