annotate runtime/syntax/typescript.vim @ 35507:1a7250350167 draft default tip

runtime(doc): In builtin overview use {buf} as param for appendbufline/setbufline (#15089) Commit: https://github.com/vim/vim/commit/f0837ba0b9dba9d30e3dc2626d4f690a2d51103e Author: errael <errael@raelity.com> Date: Mon Jun 24 12:27:01 2024 -0700 runtime(doc): In builtin overview use {buf} as param for appendbufline/setbufline (https://github.com/vim/vim/issues/15089) Signed-off-by: Ernie Rael <errael@raelity.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Mon, 24 Jun 2024 21:30:08 +0200
parents 5ea191f0c8a1
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
16971
e18b1c654d09 Update runtime files - Add typescript syntax and indent.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
1 " Vim syntax file
e18b1c654d09 Update runtime files - Add typescript syntax and indent.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
2 " Language: TypeScript
32975
71cbad0921c9 runtime: Remove Brams name from a few more runtime files (#12780)
Christian Brabandt <cb@256bit.org>
parents: 29756
diff changeset
3 " Maintainer: Herrington Darkholme
35269
5ea191f0c8a1 runtime(typescript): update outdated syntax files
Christian Brabandt <cb@256bit.org>
parents: 32975
diff changeset
4 " Last Change: 2024 May 24
16971
e18b1c654d09 Update runtime files - Add typescript syntax and indent.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
5 " Based On: Herrington Darkholme's yats.vim
32975
71cbad0921c9 runtime: Remove Brams name from a few more runtime files (#12780)
Christian Brabandt <cb@256bit.org>
parents: 29756
diff changeset
6 " Changes: Go to https://github.com/HerringtonDarkholme/yats.vim for recent changes.
18750
82a28df1e2d5 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18639
diff changeset
7 " Origin: https://github.com/othree/yajs
82a28df1e2d5 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18639
diff changeset
8 " Credits: Kao Wei-Ko(othree), Jose Elera Campana, Zhao Yi, Claudio Fleiner, Scott Shattuck
82a28df1e2d5 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18639
diff changeset
9 " (This file is based on their hard work), gumnos (From the #vim
82a28df1e2d5 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18639
diff changeset
10 " IRC Channel in Freenode)
16971
e18b1c654d09 Update runtime files - Add typescript syntax and indent.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
11
e18b1c654d09 Update runtime files - Add typescript syntax and indent.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
12 " This is the same syntax that is in yats.vim, but:
e18b1c654d09 Update runtime files - Add typescript syntax and indent.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
13 " - flattened into one file
e18b1c654d09 Update runtime files - Add typescript syntax and indent.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
14 " - HiLink commands changed to "hi def link"
e18b1c654d09 Update runtime files - Add typescript syntax and indent.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
15 " - Setting 'cpo' to the Vim value
e18b1c654d09 Update runtime files - Add typescript syntax and indent.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
16
e18b1c654d09 Update runtime files - Add typescript syntax and indent.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
17 if !exists("main_syntax")
e18b1c654d09 Update runtime files - Add typescript syntax and indent.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
18 if exists("b:current_syntax")
e18b1c654d09 Update runtime files - Add typescript syntax and indent.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
19 finish
e18b1c654d09 Update runtime files - Add typescript syntax and indent.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
20 endif
e18b1c654d09 Update runtime files - Add typescript syntax and indent.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
21 let main_syntax = 'typescript'
e18b1c654d09 Update runtime files - Add typescript syntax and indent.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
22 endif
e18b1c654d09 Update runtime files - Add typescript syntax and indent.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
23
e18b1c654d09 Update runtime files - Add typescript syntax and indent.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
24 let s:cpo_save = &cpo
e18b1c654d09 Update runtime files - Add typescript syntax and indent.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
25 set cpo&vim
e18b1c654d09 Update runtime files - Add typescript syntax and indent.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
26
18639
cb3163d590a1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 17036
diff changeset
27 " this region is NOT used in TypeScriptReact
16971
e18b1c654d09 Update runtime files - Add typescript syntax and indent.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
28 " nextgroup doesn't contain objectLiteral, let outer region contains it
e18b1c654d09 Update runtime files - Add typescript syntax and indent.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
29 syntax region typescriptTypeCast matchgroup=typescriptTypeBrackets
e18b1c654d09 Update runtime files - Add typescript syntax and indent.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
30 \ start=/< \@!/ end=/>/
e18b1c654d09 Update runtime files - Add typescript syntax and indent.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
31 \ contains=@typescriptType
e18b1c654d09 Update runtime files - Add typescript syntax and indent.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
32 \ nextgroup=@typescriptExpression
e18b1c654d09 Update runtime files - Add typescript syntax and indent.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
33 \ contained skipwhite oneline
e18b1c654d09 Update runtime files - Add typescript syntax and indent.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
34
e18b1c654d09 Update runtime files - Add typescript syntax and indent.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
35
18639
cb3163d590a1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 17036
diff changeset
36 """""""""""""""""""""""""""""""""""""""""""""""""""
cb3163d590a1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 17036
diff changeset
37 " Source the part common with typescriptreact.vim
29756
2acb87ee55fc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 18750
diff changeset
38 source <sfile>:h/shared/typescriptcommon.vim
16971
e18b1c654d09 Update runtime files - Add typescript syntax and indent.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
39
e18b1c654d09 Update runtime files - Add typescript syntax and indent.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
40
e18b1c654d09 Update runtime files - Add typescript syntax and indent.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
41 let b:current_syntax = "typescript"
e18b1c654d09 Update runtime files - Add typescript syntax and indent.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
42 if main_syntax == 'typescript'
e18b1c654d09 Update runtime files - Add typescript syntax and indent.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
43 unlet main_syntax
e18b1c654d09 Update runtime files - Add typescript syntax and indent.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
44 endif
e18b1c654d09 Update runtime files - Add typescript syntax and indent.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
45
e18b1c654d09 Update runtime files - Add typescript syntax and indent.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
46 let &cpo = s:cpo_save
e18b1c654d09 Update runtime files - Add typescript syntax and indent.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
47 unlet s:cpo_save