所以我是emacs的新手,只是在创建init.el之后和其他人一起启用了elpy,如下所示:
;; .emacs.d/init.el
;; ===================================
;; MELPA Package Support
;; ===================================
;; Enables basic packaging support
(require 'package)
;; Adds the Melpa archive to the list of available repositories
(add-to-list 'package-archives
'("melpa" . "http://melpa.org/packages/") t)
;; Initializes the package infrastructure
(package-initialize)
;; If there are no archived package contents, refresh them
(when (not package-archive-contents)
(package-refresh-contents))
;; Installs packages
;;
;; myPackages contains a list of package names
(defvar myPackages
'(better-defaults ;; Set up some better Emacs defaults
elpy ;; Emacs List Python Environment
material-theme ;; Theme
)
)
;; Scans the list in myPackages
;; If the package listed is not already installed, install it
(mapc #'(lambda (package)
(unless (package-installed-p package)
(package-install package)))
myPackages)
;; ===================================
;; Basic Customization
;; ===================================
;;(setq inhibit-startup-message t) ;; Hide the startup message
(load-theme 'material t) ;; Load material theme
(global-linum-mode t) ;; Enable line numbers globally
;; ====================================
;; Development Setup
;; ====================================
;; Enable elpy
(elpy-enable)
;; User-Defined init.el ends here
我期待它能够突出显示错误的陈述,如这篇关于 realpython 的文章中所解释的那样。
但是,错误突出显示似乎无法按预期工作,如下所示:
自动完成、语法高亮等其他功能按预期工作。请帮忙。TIA