Add comments for some extensions + test

This commit is contained in:
Adam Stankiewicz
2020-10-04 21:17:06 +02:00
parent d221139bd7
commit b4868c7ea7
10 changed files with 187 additions and 190 deletions

View File

@@ -62,6 +62,13 @@ function GetGraphQLIndent()
return 0
endif
" If the previous line isn't GraphQL, don't change this line's indentation.
" Assume we've been manually indented as part of a template string.
let l:stack = map(synstack(l:prevlnum, 1), "synIDattr(v:val, 'name')")
if get(l:stack, -1) !~# '^graphql'
return -1
endif
let l:line = getline(v:lnum)
" If this line contains just a closing bracket, find its matching opening