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.
:version
)?yats.vim
is installed the keywordas
is not highlighted when associating types (casting).