(use-package elpy
:ensure t
:bind (:map python-mode-map
("M-." . elpy-goto-definition)
("M-," . xref-pop-marker-stack)
("C-x C-e" . python-shell-send-region)
("C-x C-r" . run-python))
:init
(elpy-enable)
(remove-hook 'elpy-modules 'elpy-module-flymake)
(setq flymake-start-on-flymake-mode nil)
(setq flymake-start-syntax-check nil)
:config
(progn
;;(setq elpy-rpc-backend "jedi")
(setq elpy-rpc-python-command "python3")
(setq python-shell-interpreter "python3")
(setq py-python-command "python3")
(add-to-list 'auto-mode-alist '("\\.py$" . python-mode))
(setq python-shell-interpreter "ipython"
python-shell-interpreter-args "-i --simple-prompt")
;; enable elpy jedi backend
(setq elpy-rpc-backend "jedi")
(define-key python-mode-map (kbd "RET")
'newline-and-indent)))
这是什么?从哪来的?底下是什么字符?什么 Face?什么 Text Properties?自己用 C-u C-x =
分析看看。
好像是缩进辅助线,把这段配置删除就没有这个了,可是我又需要这个插件。。。
我用的这个,翻到这个项目 readme 最后面,有列出几个同类型的库,你瞅瞅你用的哪个。
谢谢楼上几位朋友解答,问题已解决。
原来是安装elpy是会自带highlight-indentation插件,
解决方法:
:init (elpy-enable)
下面添加这条语句,把
highlight-indentation`去除
(remove-hook 'elpy-modules 'elpy-module-highlight-indentation)