robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
5117b04745
master
1" Vim syntax file 2" Language: JSON-LD 3" Maintainer: The Vim Project <https://github.com/vim/vim> 4" Last Change: 2026 Aug 06 5" Reference: https://www.w3.org/TR/json-ld11/ 6 7if ! exists ( 'main_syntax' ) 8if exists ( 'b:current_syntax' ) 9finish 10endif 11let main_syntax = 'jsonld' 12endif 13 14runtime ! syntax/json.vim 15unlet ! b: current_syntax 16 17" Match reserved keywords only when they occupy a complete JSON string. The 18" negative lookbehind excludes an escaped quote inside a longer string. 19syn match jsonldKeyword /\C\%(\\"\)\@<!"\@<=@\%(base\|container\|context\|direction\|graph\|id\)\ze" /contained containedin = jsonKeyword , jsonString 20syn match jsonldKeyword /\C\%(\\"\)\@<!"\@<=@\%(import\|included\|index\|json\|language\|list\)\ze" /contained containedin = jsonKeyword , jsonString 21syn match jsonldKeyword /\C\%(\\"\)\@<!"\@<=@\%(nest\|none\|prefix\|propagate\|protected\|reverse\)\ze" /contained containedin = jsonKeyword , jsonString 22syn match jsonldKeyword /\C\%(\\"\)\@<!"\@<=@\%(set\|type\|value\|version\|vocab\)\ze" /contained containedin = jsonKeyword , jsonString 23 24hi def link jsonldKeyword SpecialChar 25 26let b: current_syntax = 'jsonld' 27if main_syntax ==# 'jsonld' 28unlet main_syntax 29endif 30 31" vim: ts=8