[global] Multiple small improvements.

This commit is contained in:
CAPELLE Mikaël 2020-01-17 16:49:54 +01:00
parent b1e4da735e
commit 24582f7a1c
4 changed files with 72 additions and 67 deletions

View File

@ -64,14 +64,15 @@
;; -DefBindings ;; -DefBindings
;; UTF8Coding ;; UTF8Coding
(set-selection-coding-system 'utf-8)
(prefer-coding-system 'utf-8)
(set-language-environment "UTF-8")
(set-default-coding-systems 'utf-8)
(unless *sys/win32* (unless *sys/win32*
(set-selection-coding-system 'utf-8)
(prefer-coding-system 'utf-8)
(set-language-environment "UTF-8")
(set-default-coding-systems 'utf-8)
(set-terminal-coding-system 'utf-8) (set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8) (set-keyboard-coding-system 'utf-8)
(setq locale-coding-system 'utf-8)) (setq locale-coding-system 'utf-8))
;; Treat clipboard input as UTF-8 string first; compound text next, etc. ;; Treat clipboard input as UTF-8 string first; compound text next, etc.
(when *sys/gui* (when *sys/gui*
(setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING))) (setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING)))

View File

@ -6,7 +6,7 @@
;; Copyright (C) 2019 Mingde (Matthew) Zeng ;; Copyright (C) 2019 Mingde (Matthew) Zeng
;; Created: Mon Jun 10 18:58:02 2019 (-0400) ;; Created: Mon Jun 10 18:58:02 2019 (-0400)
;; Version: 2.0.0 ;; Version: 2.0.0
;; Last-Updated: lun. janv. 13 14:24:17 2020 (+0100) ;; Last-Updated: mer. janv. 15 09:40:51 2020 (+0100)
;; By: Mikaël Capelle ;; By: Mikaël Capelle
;; URL: https://github.com/MatthewZMD/.emacs.d ;; URL: https://github.com/MatthewZMD/.emacs.d
;; Keywords: lsp-python-ms ;; Keywords: lsp-python-ms
@ -60,17 +60,20 @@
(flycheck-add-next-checker 'python-flake8 'python-mypy)) (flycheck-add-next-checker 'python-flake8 'python-mypy))
(use-package elpy (use-package elpy
:defer t
:bind
(("M-/" . elpy-company-backend))
:custom :custom
(flycheck-python-flake8-executable "python") (flycheck-python-flake8-executable "python")
(python-indent-offset 4) (python-indent-offset 4)
(python-shell-interpreter "ipython") (python-shell-interpreter "ipython")
(python-shell-interpreter-args "-i --simple-prompt") (python-shell-interpreter-args "-i --simple-prompt")
:config :config
(setq elpy-rpc-backend "jedi")
(setq elpy-modules (delq 'elpy-module-flymake elpy-modules)) (setq elpy-modules (delq 'elpy-module-flymake elpy-modules))
(add-hook 'elpy-mode-hook 'flycheck-mode) (add-hook 'elpy-mode-hook 'flycheck-mode)
:init :init
(setq elpy-rpc-backend "jedi") (advice-add 'python-mode :before 'elpy-enable))
(elpy-enable))
(use-package ein (use-package ein
:custom :custom

View File

@ -84,10 +84,11 @@
;; Whitespace ;; Whitespace
(setq-default fill-column 95) (setq-default fill-column 95)
(setq-default whitespace-line-column 95) (setq-default whitespace-line-column 95)
(add-hook 'python-mode-hook (lambda () (setq-local whitespace-line-column 100))) (add-hook 'python-mode-hook (lambda () (setq-local whitespace-line-column 92)))
(add-hook 'LaTeX-mode-hook (lambda () (setq-local whitespace-line-column -1))) (add-hook 'LaTeX-mode-hook (lambda () (setq-local whitespace-line-column 999)))
(add-hook 'markdown-mode-hook (lambda () (setq-local whitespace-line-column -1))) (add-hook 'emacs-lisp-mode-hook (lambda () (setq-local whitespace-line-column 999)))
(add-hook 'web-mode-hook (lambda () (setq-local whitespace-line-column -1))) (add-hook 'markdown-mode-hook (lambda () (setq-local whitespace-line-column 999)))
(add-hook 'web-mode-hook (lambda () (setq-local whitespace-line-column 999)))
(add-hook 'text-mode-hook #'whitespace-mode) (add-hook 'text-mode-hook #'whitespace-mode)
(add-hook 'prog-mode-hook #'whitespace-mode) (add-hook 'prog-mode-hook #'whitespace-mode)
(add-hook 'before-save-hook 'whitespace-cleanup) (add-hook 'before-save-hook 'whitespace-cleanup)