瀏覽代碼

Add python configs

master
10sr 5 年之前
父節點
當前提交
1d50b6beaa
簽署人: 10sr GPG Key ID: 7BEC428194130EB2
共有 2 個文件被更改,包括 18 次插入2 次删除
  1. +15
    -2
      emacs.el
  2. +3
    -0
      profile

+ 15
- 2
emacs.el 查看文件

@@ -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 查看文件

@@ -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


Loading…
取消
儲存