Parcourir la source

Add python configs

master
10sr il y a 5 ans
Parent
révision
1d50b6beaa
Signé par: 10sr ID de la clé GPG: 7BEC428194130EB2
2 fichiers modifiés avec 18 ajouts et 2 suppressions
  1. +15
    -2
      emacs.el
  2. +3
    -0
      profile

+ 15
- 2
emacs.el Voir le fichier

@@ -2028,12 +2028,25 @@ initializing."

(require 'flycheck)

(flycheck-define-checker black
(flycheck-define-checker python-black
"A Python style checker."
:command ("black" "--check" source)
:command ("python3"
"-m" "black"
(config-file "--config" flycheck-black)
"--check" source)
:error-parser my-flycheck-parse-unified-diff
:enabled (lambda ()
(or (not (flycheck-python-needs-module-p 'python-black))
(flycheck-python-find-module 'python-black "black")))
:verify (lambda (_) (flycheck-python-verify-module 'python-black "black"))
:modes python-mode)

(flycheck-def-config-file-var flycheck-black python-black "pyproject.toml"
:safe #'stringp)

(add-to-list 'flycheck-checkers
'python-black)

(defun my-flycheck-parse-unified-diff (output checker buffer)
"Flycheck parser to parse diff output."
(with-temp-buffer


+ 3
- 0
profile Voir le fichier

@@ -117,6 +117,9 @@ export GOPATH="$HOME/.golang"
# export GOPATH="$HOME/.golang"
export PATH="$GOPATH/bin:$PATH"

export PYTHONUSERBASE=$HOME/.pip
export PATH="$PYTHONUSERBASE/bin:$PATH"

export PIPENV_VENV_IN_PROJECT=1

export STARDICT_DATA_DIR=$HOME/.brew/share/sdcv-dict-oxford


Chargement…
Annuler
Enregistrer