3

So I am new to emacs, just enabled elpy along with others, after creating init.el as follows:

;; .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

I was expecting it to highlight erroneous statements as explained on this article on realpython.

However error highlighting doesn't seem to work as expected as shown below:

realpythonenter image description here

mineenter image description here

Other features like auto complete, syntax highlighting, etc work as expected. please help. TIA

computronium
  • 445
  • 2
  • 11
  • added flycheck for now. although that doesn't answer the question, but have error checking functionality now. – computronium Dec 19 '19 at 06:08
  • Did you set the syntax checker option at `M-x elpy-config`? – Toto Dec 19 '19 at 13:58
  • yes I did prior to getting flycheck, it's flake8, which wasn't being detected earlier, as ~/.local/bin wasn't in $PATH. Now it has flake8 but still not highlighting lines with syntax errors. flycheck to the rescue! – computronium Dec 21 '19 at 04:39

0 Answers0