Gregory Anders | 1cc4cae | 2024-07-15 20:00:48 +0200 | [diff] [blame] | 1 | " Vim syntax file |
| 2 | " Language: Typst |
Luca Saccarola | b66cac1 | 2024-12-09 20:29:14 +0100 | [diff] [blame] | 3 | " Maintainer: Luca Saccarola <github.e41mv@aleeas.com> |
Eisuke Kawashima | fbbaa6e | 2025-04-16 18:20:59 +0200 | [diff] [blame] | 4 | " Previous Maintainer: Gregory Anders |
| 5 | " Based On: https://github.com/kaarmu/typst.vim |
Luca Saccarola | b66cac1 | 2024-12-09 20:29:14 +0100 | [diff] [blame] | 6 | " Last Change: 2024 Dec 09 |
Eisuke Kawashima | fbbaa6e | 2025-04-16 18:20:59 +0200 | [diff] [blame] | 7 | " 2025 Apr 16 by Vim Project (set 'cpoptions' for line continuation, #17121) |
Gregory Anders | 1cc4cae | 2024-07-15 20:00:48 +0200 | [diff] [blame] | 8 | |
| 9 | if exists('b:current_syntax') |
| 10 | finish |
| 11 | endif |
| 12 | |
Eisuke Kawashima | fbbaa6e | 2025-04-16 18:20:59 +0200 | [diff] [blame] | 13 | let s:cpo_save = &cpo |
| 14 | set cpo&vim |
| 15 | |
Gregory Anders | 1cc4cae | 2024-07-15 20:00:48 +0200 | [diff] [blame] | 16 | syntax sync fromstart |
| 17 | syntax spell toplevel |
| 18 | |
| 19 | " Common {{{1 |
| 20 | syntax cluster typstCommon |
| 21 | \ contains=@typstComment |
| 22 | |
| 23 | " Common > Comment {{{2 |
| 24 | syntax cluster typstComment |
| 25 | \ contains=typstCommentBlock,typstCommentLine |
Yinzuo Jiang | d181baf | 2024-11-02 16:34:40 +0100 | [diff] [blame] | 26 | syntax region typstCommentBlock |
| 27 | \ start="/\*" end="\*/" keepend |
Gregory Anders | 1cc4cae | 2024-07-15 20:00:48 +0200 | [diff] [blame] | 28 | \ contains=typstCommentTodo,@Spell |
| 29 | syntax match typstCommentLine |
| 30 | \ #//.*# |
| 31 | \ contains=typstCommentTodo,@Spell |
| 32 | syntax keyword typstCommentTodo |
| 33 | \ contained |
| 34 | \ TODO FIXME XXX TBD |
| 35 | |
| 36 | |
| 37 | " Code {{{1 |
| 38 | syntax cluster typstCode |
| 39 | \ contains=@typstCommon |
| 40 | \ ,@typstCodeKeywords |
| 41 | \ ,@typstCodeConstants |
| 42 | \ ,@typstCodeIdentifiers |
| 43 | \ ,@typstCodeFunctions |
| 44 | \ ,@typstCodeParens |
| 45 | |
| 46 | " Code > Keywords {{{2 |
| 47 | syntax cluster typstCodeKeywords |
| 48 | \ contains=typstCodeConditional |
| 49 | \ ,typstCodeRepeat |
| 50 | \ ,typstCodeKeyword |
| 51 | \ ,typstCodeStatement |
| 52 | syntax keyword typstCodeConditional |
| 53 | \ contained |
| 54 | \ if else |
| 55 | syntax keyword typstCodeRepeat |
| 56 | \ contained |
| 57 | \ while for |
| 58 | syntax keyword typstCodeKeyword |
| 59 | \ contained |
| 60 | \ not in and or return |
| 61 | syntax region typstCodeStatement |
| 62 | \ contained |
| 63 | \ matchgroup=typstCodeStatementWord start=/\v(let|set|import|include)>/ |
| 64 | \ matchgroup=Noise end=/\v%(;|$)/ |
| 65 | \ contains=@typstCode |
| 66 | syntax region typstCodeStatement |
| 67 | \ contained |
| 68 | \ matchgroup=typstCodeStatementWord start=/show/ |
| 69 | \ matchgroup=Noise end=/\v%(:|$)/ keepend |
| 70 | \ contains=@typstCode |
| 71 | \ skipwhite nextgroup=@typstCode,typstCodeShowRocket |
| 72 | syntax match typstCodeShowRocket |
| 73 | \ contained |
| 74 | \ /.*=>/ |
| 75 | \ contains=@typstCode |
| 76 | \ skipwhite nextgroup=@typstCode |
| 77 | |
| 78 | " Code > Identifiers {{{2 |
| 79 | syntax cluster typstCodeIdentifiers |
| 80 | \ contains=typstCodeIdentifier |
| 81 | \ ,typstCodeFieldAccess |
| 82 | syntax match typstCodeIdentifier |
| 83 | \ contained |
| 84 | \ /\v\w\k*>(<%(let|set|show|import|include))@<![\.\[\(]@!/ |
| 85 | syntax match typstCodeFieldAccess |
| 86 | \ contained |
| 87 | \ /\v\w\k*>(<%(let|set|show|import|include))@<!\.[\[\(]@!/ |
| 88 | \ nextgroup=typstCodeFieldAccess,typstCodeFunction |
| 89 | |
| 90 | " Code > Functions {{{2 |
| 91 | syntax cluster typstCodeFunctions |
| 92 | \ contains=typstCodeFunction |
| 93 | syntax match typstCodeFunction |
| 94 | \ contained |
| 95 | \ /\v\w\k*>(<%(let|set|show|import|include))@<![\(\[]@=/ |
| 96 | \ nextgroup=typstCodeFunctionArgument |
| 97 | syntax match typstCodeFunctionArgument |
| 98 | \ contained |
| 99 | \ /\v%(%(\(.{-}\)|\[.{-}\]|\{.{-}\}))*/ transparent |
| 100 | \ contains=@typstCode |
| 101 | |
| 102 | " Code > Constants {{{2 |
| 103 | syntax cluster typstCodeConstants |
| 104 | \ contains=typstCodeConstant |
| 105 | \ ,typstCodeNumberInteger |
| 106 | \ ,typstCodeNumberFloat |
| 107 | \ ,typstCodeNumberLength |
| 108 | \ ,typstCodeNumberAngle |
| 109 | \ ,typstCodeNumberRatio |
| 110 | \ ,typstCodeNumberFraction |
| 111 | \ ,typstCodeString |
| 112 | \ ,typstCodeLabel |
| 113 | syntax match typstCodeConstant |
| 114 | \ contained |
| 115 | \ /\v<%(none|auto|true|false)-@!>/ |
| 116 | syntax match typstCodeNumberInteger |
| 117 | \ contained |
| 118 | \ /\v<\d+>/ |
| 119 | |
| 120 | syntax match typstCodeNumberFloat |
| 121 | \ contained |
| 122 | \ /\v<\d+\.\d*>/ |
| 123 | syntax match typstCodeNumberLength |
| 124 | \ contained |
| 125 | \ /\v<\d+(\.\d*)?(pt|mm|cm|in|em)>/ |
| 126 | syntax match typstCodeNumberAngle |
| 127 | \ contained |
| 128 | \ /\v<\d+(\.\d*)?(deg|rad)>/ |
| 129 | syntax match typstCodeNumberRatio |
| 130 | \ contained |
| 131 | \ /\v<\d+(\.\d*)?\%/ |
| 132 | syntax match typstCodeNumberFraction |
| 133 | \ contained |
| 134 | \ /\v<\d+(\.\d*)?fr>/ |
| 135 | syntax region typstCodeString |
| 136 | \ contained |
| 137 | \ start=/"/ skip=/\v\\\\|\\"/ end=/"/ |
| 138 | \ contains=@Spell |
| 139 | syntax match typstCodeLabel |
| 140 | \ contained |
| 141 | \ /\v\<\K%(\k*-*)*\>/ |
| 142 | |
| 143 | " Code > Parens {{{2 |
| 144 | syntax cluster typstCodeParens |
| 145 | \ contains=typstCodeParen |
| 146 | \ ,typstCodeBrace |
| 147 | \ ,typstCodeBracket |
| 148 | \ ,typstCodeDollar |
| 149 | \ ,typstMarkupRawInline |
| 150 | \ ,typstMarkupRawBlock |
| 151 | syntax region typstCodeParen |
| 152 | \ contained |
| 153 | \ matchgroup=Noise start=/(/ end=/)/ |
| 154 | \ contains=@typstCode |
| 155 | syntax region typstCodeBrace |
| 156 | \ contained |
| 157 | \ matchgroup=Noise start=/{/ end=/}/ |
| 158 | \ contains=@typstCode |
| 159 | syntax region typstCodeBracket |
| 160 | \ contained |
| 161 | \ matchgroup=Noise start=/\[/ end=/\]/ |
| 162 | \ contains=@typstMarkup |
| 163 | syntax region typstCodeDollar |
| 164 | \ contained |
| 165 | \ matchgroup=Number start=/\\\@<!\$/ end=/\\\@<!\$/ |
| 166 | \ contains=@typstMath |
| 167 | |
| 168 | |
| 169 | " Hashtag {{{1 |
| 170 | syntax cluster typstHashtag |
| 171 | \ contains=@typstHashtagKeywords |
| 172 | \ ,@typstHashtagConstants |
| 173 | \ ,@typstHashtagIdentifiers |
| 174 | \ ,@typstHashtagFunctions |
| 175 | \ ,@typstHashtagParens |
| 176 | |
| 177 | " Hashtag > Keywords {{{2 |
| 178 | syntax cluster typstHashtagKeywords |
| 179 | \ contains=typstHashtagConditional |
| 180 | \ ,typstHashtagRepeat |
| 181 | \ ,typstHashtagKeywords |
| 182 | \ ,typstHashtagStatement |
| 183 | |
| 184 | " syntax match typstHashtagControlFlowError |
| 185 | " \ /\v#%(if|while|for)>-@!.{-}$\_.{-}%(\{|\[|\()/ |
| 186 | syntax match typstHashtagControlFlow |
| 187 | \ /\v#%(if|while|for)>.{-}\ze%(\{|\[|\()/ |
| 188 | \ contains=typstHashtagConditional,typstHashtagRepeat |
| 189 | \ nextgroup=@typstCode |
| 190 | syntax region typstHashtagConditional |
| 191 | \ contained |
| 192 | \ start=/\v#if>/ end=/\v\ze(\{|\[)/ |
| 193 | \ contains=@typstCode |
| 194 | syntax region typstHashtagRepeat |
| 195 | \ contained |
| 196 | \ start=/\v#(while|for)>/ end=/\v\ze(\{|\[)/ |
| 197 | \ contains=@typstCode |
| 198 | syntax match typstHashtagKeyword |
| 199 | \ /\v#(return)>/ |
| 200 | \ skipwhite nextgroup=@typstCode |
| 201 | syntax region typstHashtagStatement |
| 202 | \ matchgroup=typstHashtagStatementWord start=/\v#(let|set|import|include)>/ |
| 203 | \ matchgroup=Noise end=/\v%(;|$)/ |
| 204 | \ contains=@typstCode |
| 205 | syntax region typstHashtagStatement |
| 206 | \ matchgroup=typstHashtagStatementWord start=/#show/ |
| 207 | \ matchgroup=Noise end=/\v%(:|$)/ keepend |
| 208 | \ contains=@typstCode |
| 209 | \ skipwhite nextgroup=@typstCode,typstCodeShowRocket |
| 210 | |
| 211 | " Hashtag > Constants {{{2 |
| 212 | syntax cluster typstHashtagConstants |
| 213 | \ contains=typstHashtagConstant |
| 214 | syntax match typstHashtagConstant |
| 215 | \ /\v#(none|auto|true|false)>/ |
| 216 | |
| 217 | " Hashtag > Identifiers {{{2 |
| 218 | syntax cluster typstHashtagIdentifiers |
| 219 | \ contains=typstHashtagIdentifier |
| 220 | \ ,typstHashtagFieldAccess |
| 221 | syntax match typstHashtagIdentifier |
| 222 | \ /\v#\w\k*>(<%(let|set|show|import|include))@<![\.\[\(]@!/ |
| 223 | syntax match typstHashtagFieldAccess |
| 224 | \ /\v#\w\k*>(<%(let|set|show|import|include))@<!\.[\[\(]@!/ |
| 225 | \ nextgroup=typstCodeFieldAccess,typstCodeFunction |
| 226 | |
| 227 | " Hashtag > Functions {{{2 |
| 228 | syntax cluster typstHashtagFunctions |
| 229 | \ contains=typstHashtagFunction |
| 230 | syntax match typstHashtagFunction |
| 231 | \ /\v#\w\k*>(<%(let|set|show|import|include))@<![\(\[]@=/ |
| 232 | \ nextgroup=typstCodeFunctionArgument |
| 233 | |
| 234 | " Hashtag > Parens {{{2 |
| 235 | syntax cluster typstHashtagParens |
| 236 | \ contains=typstHashtagParen |
| 237 | \ ,typstHashtagBrace |
| 238 | \ ,typstHashtagBracket |
| 239 | \ ,typstHashtagDollar |
| 240 | syntax region typstHashtagParen |
| 241 | \ matchgroup=Noise start=/#(/ end=/)/ |
| 242 | \ contains=@typstCode |
| 243 | syntax region typstHashtagBrace |
| 244 | \ matchgroup=Noise start=/#{/ end=/}/ |
| 245 | \ contains=@typstCode |
| 246 | syntax region typstHashtagBracket |
| 247 | \ matchgroup=Noise start=/#\[/ end=/\]/ |
| 248 | \ contains=@typstMarkup |
| 249 | syntax region typstHashtagDollar |
| 250 | \ matchgroup=Noise start=/#\$/ end=/\\\@<!\$/ |
| 251 | \ contains=@typstMath |
| 252 | |
| 253 | |
| 254 | " Markup {{{1 |
| 255 | syntax cluster typstMarkup |
| 256 | \ contains=@typstCommon |
| 257 | \ ,@Spell |
| 258 | \ ,@typstHashtag |
| 259 | \ ,@typstMarkupText |
| 260 | \ ,@typstMarkupParens |
| 261 | |
| 262 | " Markup > Text {{{2 |
| 263 | syntax cluster typstMarkupText |
| 264 | \ contains=typstMarkupRawInline |
| 265 | \ ,typstMarkupRawBlock |
| 266 | \ ,typstMarkupLabel |
| 267 | \ ,typstMarkupReference |
| 268 | \ ,typstMarkupUrl |
| 269 | \ ,typstMarkupHeading |
| 270 | \ ,typstMarkupBulletList |
| 271 | \ ,typstMarkupEnumList |
| 272 | \ ,typstMarkupTermList |
| 273 | \ ,typstMarkupBold |
| 274 | \ ,typstMarkupItalic |
| 275 | \ ,typstMarkupLinebreak |
| 276 | \ ,typstMarkupNonbreakingSpace |
| 277 | \ ,typstMarkupShy |
| 278 | \ ,typstMarkupDash |
| 279 | \ ,typstMarkupEllipsis |
| 280 | |
| 281 | " Raw Text |
| 282 | syntax match typstMarkupRawInline |
| 283 | \ /`.\{-}`/ |
| 284 | syntax region typstMarkupRawBlock |
| 285 | \ matchgroup=Macro start=/```\w*/ |
| 286 | \ matchgroup=Macro end=/```/ keepend |
| 287 | syntax region typstMarkupCodeBlockTypst |
| 288 | \ matchgroup=Macro start=/```typst/ |
| 289 | \ matchgroup=Macro end=/```/ contains=@typstCode keepend |
| 290 | \ concealends |
| 291 | |
| 292 | for s:name in get(g:, 'typst_embedded_languages', []) |
| 293 | let s:include = ['syntax include' |
| 294 | \ ,'@typstEmbedded_'..s:name |
| 295 | \ ,'syntax/'..s:name..'.vim'] |
| 296 | let s:rule = ['syn region' |
| 297 | \,s:name |
| 298 | \,'matchgroup=Macro' |
| 299 | \,'start=/```'..s:name..'\>/ end=/```/' |
| 300 | \,'contains=@typstEmbedded_'..s:name |
| 301 | \,'keepend' |
| 302 | \,'concealends'] |
| 303 | execute 'silent! ' .. join(s:include, ' ') |
| 304 | unlet! b:current_syntax |
| 305 | execute join(s:rule, ' ') |
| 306 | endfor |
| 307 | |
| 308 | " Label & Reference |
| 309 | syntax match typstMarkupLabel |
| 310 | \ /\v\<\K%(\k*-*)*\>/ |
| 311 | syntax match typstMarkupReference |
| 312 | \ /\v\@\K%(\k*-*)*/ |
| 313 | |
| 314 | " URL |
| 315 | syntax match typstMarkupUrl |
| 316 | \ #\v\w+://\S*# |
| 317 | |
| 318 | " Heading |
| 319 | syntax match typstMarkupHeading |
| 320 | \ /^\s*\zs=\{1,6}\s.*$/ |
| 321 | \ contains=typstMarkupLabel,@Spell |
| 322 | |
| 323 | " Lists |
| 324 | syntax match typstMarkupBulletList |
| 325 | \ /\v^\s*-\s+/ |
| 326 | syntax match typstMarkupEnumList |
| 327 | \ /\v^\s*(\+|\d+\.)\s+/ |
| 328 | syntax region typstMarkupTermList |
| 329 | \ oneline start=/\v^\s*\/\s/ end=/:/ |
| 330 | \ contains=@typstMarkup |
| 331 | |
| 332 | " Bold & Italic |
| 333 | syntax match typstMarkupBold |
| 334 | \ /\v(\w|\\)@1<!\*\S@=.{-}(\n.{-1,})*\S@1<=\\@1<!\*/ |
| 335 | \ contains=typstMarkupBoldRegion |
| 336 | syntax match typstMarkupItalic |
| 337 | \ /\v(\w|\\)@1<!_\S@=.{-}(\n.{-1,})*\S@1<=\\@1<!_/ |
| 338 | \ contains=typstMarkupItalicRegion |
| 339 | syntax match typstMarkupBoldItalic |
| 340 | \ contained |
| 341 | \ /\v(\w|\\)@1<![_\*]\S@=.{-}(\n.{-1,})*\S@1<=\\@1<!\2/ |
| 342 | \ contains=typstMarkupBoldRegion,typstMarkupItalicRegion |
| 343 | syntax region typstMarkupBoldRegion |
| 344 | \ contained |
| 345 | \ transparent matchgroup=typstMarkupBold |
| 346 | \ start=/\(^\|[^0-9a-zA-Z]\)\@<=\*/ end=/\*\($\|[^0-9a-zA-Z]\)\@=/ |
| 347 | \ concealends contains=typstMarkupBoldItalic,typstMarkupLabel,@Spell |
| 348 | syntax region typstMarkupItalicRegion |
| 349 | \ contained |
| 350 | \ transparent matchgroup=typstMarkupItalic |
| 351 | \ start=/\(^\|[^0-9a-zA-Z]\)\@<=_/ end=/_\($\|[^0-9a-zA-Z]\)\@=/ |
| 352 | \ concealends contains=typstMarkupBoldItalic,typstMarkupLabel,@Spell |
| 353 | |
| 354 | " Linebreak & Special Whitespace |
| 355 | syntax match typstMarkupLinebreak |
| 356 | \ /\\\\/ |
| 357 | syntax match typstMarkupNonbreakingSpace |
| 358 | \ /\~/ |
| 359 | syntax match typstMarkupShy |
| 360 | \ /-?/ |
| 361 | |
| 362 | " Special Symbols |
| 363 | syntax match typstMarkupDash |
| 364 | \ /-\{2,3}/ |
| 365 | syntax match typstMarkupEllipsis |
| 366 | \ /\.\.\./ |
| 367 | |
| 368 | " Markup > Parens {{{2 |
| 369 | syntax cluster typstMarkupParens |
| 370 | \ contains=typstMarkupBracket |
| 371 | \ ,typstMarkupDollar |
| 372 | syntax region typstMarkupBracket |
| 373 | \ matchgroup=Noise start=/\[/ end=/\]/ |
| 374 | \ contains=@typstMarkup |
| 375 | syntax region typstMarkupDollar |
| 376 | \ matchgroup=Special start=/\\\@<!\$/ end=/\\\@<!\$/ |
| 377 | \ contains=@typstMath |
| 378 | |
| 379 | |
| 380 | " Math {{{1 |
| 381 | syntax cluster typstMath |
| 382 | \ contains=@typstCommon |
| 383 | \ ,@typstHashtag |
| 384 | \ ,typstMathIdentifier |
| 385 | \ ,typstMathFunction |
| 386 | \ ,typstMathNumber |
| 387 | \ ,typstMathSymbol |
| 388 | \ ,typstMathBold |
| 389 | \ ,typstMathScripts |
| 390 | \ ,typstMathQuote |
| 391 | |
| 392 | syntax match typstMathIdentifier |
| 393 | \ /\a\a\+/ |
| 394 | \ contained |
| 395 | syntax match typstMathFunction |
| 396 | \ /\a\a\+\ze(/ |
| 397 | \ contained |
| 398 | syntax match typstMathNumber |
| 399 | \ /\<\d\+\>/ |
| 400 | \ contained |
| 401 | syntax region typstMathQuote |
| 402 | \ matchgroup=String start=/"/ skip=/\\"/ end=/"/ |
| 403 | \ contained |
| 404 | |
| 405 | " Math > Linked groups {{{2 |
| 406 | highlight default link typstMathIdentifier Identifier |
| 407 | highlight default link typstMathFunction Statement |
| 408 | highlight default link typstMathNumber Number |
| 409 | highlight default link typstMathSymbol Statement |
| 410 | |
| 411 | " Highlighting {{{1 |
| 412 | |
| 413 | " Highlighting > Linked groups {{{2 |
| 414 | highlight default link typstCommentBlock Comment |
| 415 | highlight default link typstCommentLine Comment |
| 416 | highlight default link typstCommentTodo Todo |
| 417 | highlight default link typstCodeConditional Conditional |
| 418 | highlight default link typstCodeRepeat Repeat |
| 419 | highlight default link typstCodeKeyword Keyword |
| 420 | highlight default link typstCodeConstant Constant |
| 421 | highlight default link typstCodeNumberInteger Number |
| 422 | highlight default link typstCodeNumberFloat Number |
| 423 | highlight default link typstCodeNumberLength Number |
| 424 | highlight default link typstCodeNumberAngle Number |
| 425 | highlight default link typstCodeNumberRatio Number |
| 426 | highlight default link typstCodeNumberFraction Number |
| 427 | highlight default link typstCodeString String |
| 428 | highlight default link typstCodeLabel Structure |
| 429 | highlight default link typstCodeStatementWord Statement |
| 430 | highlight default link typstCodeIdentifier Identifier |
| 431 | highlight default link typstCodeFieldAccess Identifier |
| 432 | highlight default link typstCodeFunction Function |
| 433 | highlight default link typstCodeParen Noise |
| 434 | highlight default link typstCodeBrace Noise |
| 435 | highlight default link typstCodeBracket Noise |
| 436 | highlight default link typstCodeDollar Noise |
| 437 | " highlight default link typstHashtagControlFlowError Error |
| 438 | highlight default link typstHashtagConditional Conditional |
| 439 | highlight default link typstHashtagRepeat Repeat |
| 440 | highlight default link typstHashtagKeyword Keyword |
| 441 | highlight default link typstHashtagConstant Constant |
| 442 | highlight default link typstHashtagStatementWord Statement |
| 443 | highlight default link typstHashtagIdentifier Identifier |
| 444 | highlight default link typstHashtagFieldAccess Identifier |
| 445 | highlight default link typstHashtagFunction Function |
| 446 | highlight default link typstHashtagParen Noise |
| 447 | highlight default link typstHashtagBrace Noise |
| 448 | highlight default link typstHashtagBracket Noise |
| 449 | highlight default link typstHashtagDollar Noise |
| 450 | highlight default link typstMarkupRawInline Macro |
| 451 | highlight default link typstMarkupRawBlock Macro |
| 452 | highlight default link typstMarkupLabel Structure |
| 453 | highlight default link typstMarkupReference Structure |
| 454 | highlight default link typstMarkupBulletList Structure |
| 455 | " highlight default link typstMarkupItalicError Error |
| 456 | " highlight default link typstMarkupBoldError Error |
| 457 | highlight default link typstMarkupEnumList Structure |
| 458 | highlight default link typstMarkupLinebreak Structure |
| 459 | highlight default link typstMarkupNonbreakingSpace Structure |
| 460 | highlight default link typstMarkupShy Structure |
| 461 | highlight default link typstMarkupDash Structure |
| 462 | highlight default link typstMarkupEllipsis Structure |
| 463 | highlight default link typstMarkupTermList Structure |
| 464 | highlight default link typstMarkupDollar Noise |
| 465 | |
| 466 | " Highlighting > Custom Styling {{{2 |
| 467 | highlight! Conceal ctermfg=NONE ctermbg=NONE guifg=NONE guibg=NONE |
| 468 | |
| 469 | highlight default typstMarkupHeading term=underline,bold cterm=underline,bold gui=underline,bold |
| 470 | highlight default typstMarkupUrl term=underline cterm=underline gui=underline |
| 471 | highlight default typstMarkupBold term=bold cterm=bold gui=bold |
| 472 | highlight default typstMarkupItalic term=italic cterm=italic gui=italic |
| 473 | highlight default typstMarkupBoldItalic term=bold,italic cterm=bold,italic gui=bold,italic |
| 474 | |
| 475 | let b:current_syntax = 'typst' |
| 476 | |
Eisuke Kawashima | fbbaa6e | 2025-04-16 18:20:59 +0200 | [diff] [blame] | 477 | let &cpo = s:cpo_save |
| 478 | unlet s:cpo_save |
| 479 | |
Gregory Anders | 1cc4cae | 2024-07-15 20:00:48 +0200 | [diff] [blame] | 480 | " }}}1 |