;;; init-python.el --- -*- lexical-binding: t -*- ;; ;; Filename: init-python.el ;; Description: Initialize Python ;; Author: Mingde (Matthew) Zeng ;; Copyright (C) 2019 Mingde (Matthew) Zeng ;; Created: Mon Jun 10 18:58:02 2019 (-0400) ;; Version: 2.0.0 ;; Last-Updated: lun. janv. 13 14:24:17 2020 (+0100) ;; By: Mikaƫl Capelle ;; URL: https://github.com/MatthewZMD/.emacs.d ;; Keywords: lsp-python-ms ;; Compatibility: emacs-version >= 26.1 ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;;; Commentary: ;; ;; This initializes lsp-python-ms ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; This program is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or (at ;; your option) any later version. ;; ;; This program is distributed in the hope that it will be useful, but ;; WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ;; General Public License for more details. ;; ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;;; Code: (eval-when-compile (require 'init-flycheck) (require 'init-const)) ;; PythonConfig ;; (use-package python-mode ;; :ensure nil ;; :after flycheck ;; :mode "\\.py\\'" ;; :custom ;; (python-indent-offset 4) ;; (flycheck-python-pycompile-executable "python3") ;; (python-shell-interpreter "python3")) ;; ;; -PythonConfig (add-hook 'python-mode-hook (lambda () (setq-local whitespace-line-column 100))) (use-package flycheck-mypy :after flycheck :config (flycheck-add-next-checker 'python-flake8 'python-mypy)) (use-package elpy :custom (flycheck-python-flake8-executable "python") (python-indent-offset 4) (python-shell-interpreter "ipython") (python-shell-interpreter-args "-i --simple-prompt") :config (setq elpy-modules (delq 'elpy-module-flymake elpy-modules)) (add-hook 'elpy-mode-hook 'flycheck-mode) :init (setq elpy-rpc-backend "jedi") (elpy-enable)) (use-package ein :custom (ein:polymode t) (ein:use-auto-complete t) :commands (ein:notebooklist-open)) ;; LSPPythonPac ;; (use-package lsp-python-ms ;; :after lsp-mode python ;; :if (or *python3* *python*) ;; :custom ;; (lsp-python-executable-cmd "python3")) ;; ;; -LSPPythonPac (provide 'init-python) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; init-python.el ends here