Skip to main content
3 of 3
deleted 6 characters in body
D. Ben Knoble
  • 27.7k
  • 3
  • 31
  • 68

The typescript syntax of recent version of Vim (e.g. Vim 9.1) is based Herrington Darkholme's yats.vim I expect very little differences between the Herrington Darkholme's syntax and the default Vim typescript syntax for recent version of Vim.

To determine the highlight group of a keyword or construction you could:

  • Move your cursor on the keyword or construction
  • Run: echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")')

For both syntax (the Vim 9.1 default or the HerringtonDarkholme's version) the highlight group of the as keyword is: typescriptCastKeyword.

Remark: It could be that you don't get the color you want because of the colorscheme you use.

Vivian De Smedt
  • 21.1k
  • 5
  • 22
  • 40