idris-hackers / idris-mode

Idris syntax highlighting, compiler-supported editing, interactive REPL and more things for Emacs.
GNU General Public License v3.0
268 stars 70 forks source link

Strange syntax highlighting #498

Closed mhwombat closed 5 years ago

mhwombat commented 5 years ago

I am using idris-mode 0.9.19. I got it from Melpa Stable, but I think it's the same version that's on GitHub. I am seeing a strange effect with syntax highlighting. When I first load in Idris source file, only certain keywords are in colour.

screen1

Then, If I load the file into the Idris REPL, identifiers are in colour, but the last character of each identifier is not in colour.

screen2

Here is a minimal emacs configuration which reproduces this behaviour.

;; No startup screen
(setq inhibit-startup-screen t)

;; open with single window
(add-hook 'emacs-startup-hook 'delete-other-windows)

;; Repos
(require 'package) ;; This is built-in
(add-to-list 'package-archives
             '("gnu" . "http://elpa.gnu.org/packages/") t)
(add-to-list 'package-archives
             '("melpa" . "http://melpa.org/packages/") t)
(add-to-list 'package-archives
             '("melpa-stable" . "http://stable.melpa.org/packages/") t)
(package-initialize)
;; (package-refresh-contents)
jsoo1 commented 5 years ago

Thanks for the report! Two things:

What version of idris do you have?

jsoo1 commented 5 years ago

Hmm. Actually now that I look at it, I think our melpa-stable is quite out of date. Could you try plain melpa and let me know what happens?

mhwombat commented 5 years ago

Upgrading to the plain melpa version fixed it. Thank you!