This PR updates outdated syntax highlighting for typescript
file type.
These files were imported on 2022 but have not been updated for a long time. On the other hand TypeScript has grown with new syntaxes such as type-only imports. They don't support the new syntaxes and caused an issue like HerringtonDarkholme/yats.vim#276.
I talked with @HerringtonDarkholme at HerringtonDarkholme/yats.vim#277 about this and the author agreed updating the upstream files by me.
I tested this change with the following test inputs and it looked working fine:
I also added myself to the maintainers list of these files since the author is very busy. I think I can help the author.
https://github.com/vim/vim/pull/14840
(3 files)
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
@rhysd pushed 1 commit.
—
View it on GitHub.
You are receiving this because you are subscribed to this thread.
@rhysd commented on this pull request.
In runtime/syntax/shared/typescriptcommon.vim:
> @@ -623,25 +652,24 @@ syntax keyword typescriptReadonlyArrayKeyword readonly " extension -if get(g:, 'yats_host_keyword', 1) - syntax keyword typescriptGlobal containedin=typescriptIdentifierName Function Boolean - " use of nextgroup Suggested by Doug Kearns +if get(g:, 'typescript_host_keyword', 1)
I renamed g:yats_host_keyword
to g:typescript_host_keyword
because I believe the original variable name is a mistake when this file was imported from yats.vim because it is weird that the original 3rd party plugin's name remains. Please let me know if my assumption is wrong.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
@chrisbra commented on this pull request.
In runtime/syntax/shared/typescriptcommon.vim:
> @@ -623,25 +652,24 @@ syntax keyword typescriptReadonlyArrayKeyword readonly " extension -if get(g:, 'yats_host_keyword', 1) - syntax keyword typescriptGlobal containedin=typescriptIdentifierName Function Boolean - " use of nextgroup Suggested by Doug Kearns +if get(g:, 'typescript_host_keyword', 1)
That is probably fine, since it doesn't seem to be documented :/ and also unused in other runtime scripts, if I see that correctly. Can you please add a short paragraph about this variable in :h syntax.txt
at a tag ft-typescript-syntax
(similar to other syntax descriptions).
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
@rhysd commented on this pull request.
In runtime/syntax/shared/typescriptcommon.vim:
> @@ -623,25 +652,24 @@ syntax keyword typescriptReadonlyArrayKeyword readonly " extension -if get(g:, 'yats_host_keyword', 1) - syntax keyword typescriptGlobal containedin=typescriptIdentifierName Function Boolean - " use of nextgroup Suggested by Doug Kearns +if get(g:, 'typescript_host_keyword', 1)
Sure. I'll try to add document.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
@rhysd pushed 2 commits.
—
View it on GitHub.
You are receiving this because you are subscribed to this thread.
@chrisbra I added new commits to resolve your comment. Would you review them?
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
Thanks looks good. I think the language can be improved, will do it while merging it. Thanks.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
Thank you!
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
thank you!
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.