GNU bug report logs - #60689
29.0.60; typescript-ts-mode and tsx-ts-mode does not highlight imports as variables [PATCH]

Previous Next

Package: emacs;

Reported by: jostein <at> kjonigsen.net

Date: Mon, 9 Jan 2023 10:21:02 UTC

Severity: normal

Tags: patch

Found in version 29.0.60

Done: Jostein Kjønigsen <jostein <at> secure.kjonigsen.net>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 60689 <at> debbugs.gnu.org (full text, mbox):

From: Yuan Fu <casouri <at> gmail.com>
To: Jostein Kjønigsen <jostein <at> secure.kjonigsen.net>
Cc: jostein <at> kjonigsen.net, Theodor Thornhill <theo <at> thornhill.no>,
 60689 <at> debbugs.gnu.org
Subject: Re: bug#60689: 29.0.60; typescript-ts-mode and tsx-ts-mode does not 
 highlight imports as variables [PATCH]
Date: Mon, 9 Jan 2023 20:07:29 -0800
Jostein Kjønigsen <jostein <at> secure.kjonigsen.net> writes:

> When importing packages/functions/whatever in typescript using import-statements, the imported entities are not
> highlighted.
>
> This differs from when using require() syntax.
>
> import jwt from "jsonwebtoken";        // jwt -not- highlighted
> import { verify } from "jsonwebtoken"; // verify -not- highlighted
> const jwt = require("jsonwebtoken");   // jwt is highlighted.
>
> Attached is a patch which updates typescript-ts-mode and tsx-ts-mode to highlight these imports properly.

Thanks! I applied the patch. I’ll add similar fixes to js-ts-mode.

Yuan




This bug report was last modified 2 years and 132 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.