Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for linked data #69

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions syntax/json.vim
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,19 @@ syn keyword jsonNull null
syn region jsonFold matchgroup=jsonBraces start="{" end=/}\(\_s\+\ze\("\|{\)\)\@!/ transparent fold
syn region jsonFold matchgroup=jsonBraces start="\[" end=/]\(\_s\+\ze"\)\@!/ transparent fold

"============================================
"Syntax: Json+ld, Json Linked Data Support, http://json-ld.org/
"Maintainer: Kevin Olson <[email protected]>
syn match jsonldKeyword /@\w\+/ contained containedin=jsonString,jsonKeyword
syn match jsonldCurie '\w\+:\(\([^/"][^/"]\|/\?[^/"]\)[^"]*\)\+' contained containedin=jsonString,jsonKeyword

hi def link jsonldKeyword Keyword
hi def link jsonldCurie Special

"=======================



" Define the default highlighting.
if version >= 508 || !exists("did_json_syn_inits")
hi def link jsonPadding Operator
Expand All @@ -121,11 +134,14 @@ if version >= 508 || !exists("did_json_syn_inits")
hi def link jsonNoise Noise
endif


let b:current_syntax = "json"
if main_syntax == 'json'
unlet main_syntax
endif



" Vim settings
" vim: ts=8 fdm=marker

Expand Down