diff options
Diffstat (limited to 'indent')
| -rw-r--r-- | indent/graphql.vim | 7 | 
1 files changed, 7 insertions, 0 deletions
| diff --git a/indent/graphql.vim b/indent/graphql.vim index 3a910928..12204f5f 100644 --- a/indent/graphql.vim +++ b/indent/graphql.vim @@ -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 | 
