poefilter.vim 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. " Vim syntax file
  2. " Language: PoE item filter
  3. " Maintainer: ObserverOfTime <chronobserver@disroot.org>
  4. " Filenames: *.filter
  5. " Last Change: 2022 Oct 07
  6. if exists('b:current_syntax')
  7. finish
  8. endif
  9. let s:cpo_save = &cpoptions
  10. set cpoptions&vim
  11. " Comment
  12. syn keyword poefilterTodo TODO NOTE XXX contained
  13. syn match poefilterCommentTag /\[[0-9A-Z\[\]]\+\]/ contained
  14. syn match poefilterComment /#.*$/ contains=poefilterTodo,poefilterCommentTag,@Spell
  15. " Blocks
  16. syn keyword poefilterBlock Show Hide
  17. " Conditions
  18. syn keyword poefilterCondition
  19. \ AlternateQuality
  20. \ AnyEnchantment
  21. \ BlightedMap
  22. \ Corrupted
  23. \ ElderItem
  24. \ ElderMap
  25. \ FracturedItem
  26. \ Identified
  27. \ Mirrored
  28. \ Replica
  29. \ Scourged
  30. \ ShapedMap
  31. \ ShaperItem
  32. \ SynthesisedItem
  33. \ UberBlightedMap
  34. \ skipwhite nextgroup=poefilterBoolean
  35. syn keyword poefilterCondition
  36. \ ArchnemesisMod
  37. \ BaseType
  38. \ Class
  39. \ EnchantmentPassiveNode
  40. \ HasEnchantment
  41. \ HasExplicitMod
  42. \ ItemLevel
  43. \ SocketGroup
  44. \ Sockets
  45. \ skipwhite nextgroup=poefilterOperator,poefilterString
  46. syn keyword poefilterCondition
  47. \ AreaLevel
  48. \ BaseArmour
  49. \ BaseDefencePercentile
  50. \ BaseEnergyShield
  51. \ BaseEvasion
  52. \ BaseWard
  53. \ CorruptedMods
  54. \ DropLevel
  55. \ EnchantmentPassiveNum
  56. \ GemLevel
  57. \ HasEaterOfWorldsImplicit
  58. \ HasSearingExarchImplicit
  59. \ Height
  60. \ LinkedSockets
  61. \ MapTier
  62. \ Quality
  63. \ StackSize
  64. \ Width
  65. \ skipwhite nextgroup=poefilterOperator,poefilterNumber
  66. syn keyword poefilterCondition
  67. \ GemQualityType
  68. \ skipwhite nextgroup=poefilterString,poefilterQuality
  69. syn keyword poefilterCondition
  70. \ HasInfluence
  71. \ skipwhite nextgroup=poefilterString,poefilterInfluence
  72. syn keyword poefilterCondition
  73. \ Rarity
  74. \ skipwhite nextgroup=poefilterString,poefilterRarity
  75. " Actions
  76. syn keyword poefilterAction
  77. \ PlayAlertSound
  78. \ PlayAlertSoundPositional
  79. \ skipwhite nextgroup=poefilterNumber,poefilterDisable
  80. syn keyword poefilterAction
  81. \ CustomAlertSound
  82. \ CustomAlertSoundOptional
  83. \ skipwhite nextgroup=poefilterString
  84. syn keyword poefilterAction
  85. \ DisableDropSound
  86. \ EnableDropSound
  87. \ DisableDropSoundIfAlertSound
  88. \ EnableDropSoundIfAlertSound
  89. \ skipwhite nextgroup=poefilterBoolean
  90. syn keyword poefilterAction
  91. \ MinimapIcon
  92. \ SetBackgroundColor
  93. \ SetBorderColor
  94. \ SetFontSize
  95. \ SetTextColor
  96. \ skipwhite nextgroup=poefilterNumber
  97. syn keyword poefilterAction
  98. \ PlayEffect
  99. \ skipwhite nextgroup=poefilterColour
  100. " Operators
  101. syn match poefilterOperator /!\|[<>=]=\?/ contained
  102. \ skipwhite nextgroup=poefilterString,poefilterNumber,
  103. \ poefilterQuality,poefilterRarity,poefilterInfluence
  104. " Arguments
  105. syn match poefilterString /[-a-zA-Z0-9:,']/ contained contains=@Spell
  106. \ skipwhite nextgroup=poefilterString,poefilterNumber,
  107. \ poefilterQuality,poefilterRarity,poefilterInfluence
  108. syn region poefilterString matchgroup=poefilterQuote keepend
  109. \ start=/"/ end=/"/ concealends contained contains=@Spell
  110. \ skipwhite nextgroup=poefilterString,poefilterNumber,
  111. \ poefilterQuality,poefilterRarity,poefilterInfluence
  112. syn match poefilterNumber /-1\|0\|[1-9][0-9]*/ contained
  113. \ skipwhite nextgroup=poefilterString,poefilterNumber,
  114. \ poefilterQuality,poefilterRarity,poefilterInfluence,poefilterColour
  115. syn keyword poefilterBoolean True False contained
  116. " Special arguments (conditions)
  117. syn keyword poefilterQuality Superior Divergent Anomalous Phantasmal
  118. \ contained skipwhite nextgroup=poefilterString,poefilterQuality
  119. syn keyword poefilterRarity Normal Magic Rare Unique
  120. \ contained skipwhite nextgroup=poefilterString,poefilterRarity
  121. syn keyword poefilterInfluence Shaper Elder
  122. \ Crusader Hunter Redeemer Warlord None
  123. \ contained skipwhite nextgroup=poefilterString,poefilterInfluence
  124. " Special arguments (actions)
  125. syn keyword poefilterColour Red Green Blue Brown
  126. \ White Yellow Cyan Grey Orange Pink Purple
  127. \ contained skipwhite nextgroup=poefilterShape,poefilterTemp
  128. syn keyword poefilterShape Circle Diamond Hecagon Square Star Triangle
  129. \ Cross Moon Raindrop Kite Pentagon UpsideDownHouse contained
  130. syn keyword poefilterDisable None contained
  131. syn keyword poefilterTemp Temp contained
  132. " Colours
  133. hi def link poefilterAction Statement
  134. hi def link poefilterBlock Structure
  135. hi def link poefilterBoolean Boolean
  136. hi def link poefilterColour Special
  137. hi def link poefilterComment Comment
  138. hi def link poefilterCommentTag SpecialComment
  139. hi def link poefilterCondition Conditional
  140. hi def link poefilterDisable Constant
  141. hi def link poefilterInfluence Special
  142. hi def link poefilterNumber Number
  143. hi def link poefilterOperator Operator
  144. hi def link poefilterQuality Special
  145. hi def link poefilterQuote Delimiter
  146. hi def link poefilterRarity Special
  147. hi def link poefilterShape Special
  148. hi def link poefilterString String
  149. hi def link poefilterTemp StorageClass
  150. hi def link poefilterTodo Todo
  151. let b:current_syntax = 'poefilter'
  152. let &cpoptions = s:cpo_save
  153. unlet s:cpo_save