Index: mlir/utils/vim/syntax/mlir.vim =================================================================== --- mlir/utils/vim/syntax/mlir.vim +++ mlir/utils/vim/syntax/mlir.vim @@ -84,12 +84,13 @@ syn match mlirFloat /-\?\<\d\+\.\d*\(e[+-]\d\+\)\?\>/ syn match mlirFloat /\<0x\x\+\>/ syn keyword mlirBoolean true false -syn match mlirComment /\/\/.*$/ +" Spell checking is enabled only in comments by default. +syn match mlirComment /\/\/.*$/ contains=@Spell syn region mlirString start=/"/ skip=/\\"/ end=/"/ syn match mlirLabel /[-a-zA-Z$._][-a-zA-Z$._0-9]*:/ -syn match mlirIdentifier /[%@][a-zA-Z$._-][a-zA-Z0-9$._-]*/ -syn match mlirIdentifier /[%@!]\d\+\>/ -syn match mlirMapSetOutline "#.*$" +" Prefixed identifiers, including attribute aliases (starting with '#'). +syn match mlirIdentifier /[%@#][a-zA-Z$._-][a-zA-Z0-9$._-]*/ +syn match mlirIdentifier /[%@#!]\d\+\>/ " Syntax-highlight lit test commands and bug numbers. syn match mlirSpecialComment /\/\/\s*RUN:.*$/ @@ -111,7 +112,6 @@ HiLink mlirType Type HiLink mlirOps Statement - HiLink mlirMapSetOutline PreProc HiLink mlirNumber Number HiLink mlirComment Comment HiLink mlirString String