typescript-vim
typescript-vim copied to clipboard
Highlight classes names and methods names?
Is it possible to highlight classes names and methods names?
Yes it is possible but only by adding new syntax matches to this syntax. Essentially that means defining regex patterns that will match those class and method names.
Do you know any resources on how to create syntax files ? I'd love to take care of this. PS: thanks for the wonderful plugin
Hi @Zabanaa, a good place to start with any vimscript learnings is Steve Losh's Learn Vimscript the Hardway. There are two chapters in there on syntax highlighting. Also the built-in help, the user-guide :help usr_44
and reference :help syn-define
.
I would be very happy to get more contributions on this, thanks.
@Zabanaa maybe you can check https://github.com/pangloss/vim-javascript for inspiration
vim's built in typescript syntax highlighter does this. The problem I had with the native solution was that it breaks on template strings (e.g. backticks)...which is why I tried out this plugin. I also notice that =|!|false|true
are different colors than what the theming states they should be. This essentially breaks any native themes. There has to be something that isn't mapped correctly.