HerringtonDarkholme / yats.vim

Yet Another TypeScript Syntax: The most advanced TypeScript Syntax Highlighting in Vim
Vim License
649 stars 68 forks source link

Arbitrary module identifiers support #291

Open rhysd opened 3 weeks ago

rhysd commented 3 weeks ago

TypeScript 5.6 supported arbitrary module identifiers.

declare const some_imports: unknown;
export { some_imports as "some imports" };

import { "some imports" as foo } from "./module.js";

Syntax highlighting for the export statement worked fine out-of-box but import statement didn't work (notice the string literal is not highlighted):

image

This PR fixes the syntax highlighting with renaming typescriptTypeBlock to typescriptImportBlock. The screenshot after the fix is:

image

I also updated the files in merged/*.vim.