rust-lang / rust-lang/rust-mode

Parentheses highlight incorrectly after running rust-format-buffer

Open
#147 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

highlighting rustfmt
Dominant language
Emacs Lisp
Stars
1.3k
Forks
198
PR merge metrics
No merged PRs in 30d

Description

Strange issue here, normally everything is working fine, but when I run rust-format-buffer, all instances of () and {} and [] change colour, in my case to red (I'm using the zenburn theme on spacemacs on os x so they shoudl be off-white).

If I kill the buffer and reopen it then they reappear the correct colour, but running rust-format-buffer again repeats the colour change.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in rust-mode by running rust-format-buffer on a buffer containing parentheses, braces, and brackets, then compare their highlighting before and after formatting. Trace the formatting command and its interaction with Emacs font-lock or faces; done means the delimiters retain the theme's normal color after formatting and reopening is no longer needed.

Written by the indexing model from the issue text.

Assessment

Tech stack
emacs-lisp, rust
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.