diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2021-04-14 11:59:14 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2021-04-14 11:59:22 +0200 |
commit | 9e45c07a8d2eb77a1d276f762a448f42a33a47c6 (patch) | |
tree | f7a2926e460a75b7bd5b7498576042275e9fa57f /indent | |
parent | 3c5fca7621a1f5e53911195ebb6e7c777fad8031 (diff) | |
download | vim-polyglot-9e45c07a8d2eb77a1d276f762a448f42a33a47c6.tar.gz vim-polyglot-9e45c07a8d2eb77a1d276f762a448f42a33a47c6.zip |
Update
Diffstat (limited to 'indent')
-rw-r--r-- | indent/cdl.vim | 12 | ||||
-rw-r--r-- | indent/graphql.vim | 2 | ||||
-rw-r--r-- | indent/julia.vim | 4 |
3 files changed, 11 insertions, 7 deletions
diff --git a/indent/cdl.vim b/indent/cdl.vim index 9c261276..4c679e83 100644 --- a/indent/cdl.vim +++ b/indent/cdl.vim @@ -66,10 +66,14 @@ fun! CdlGetIndent(lnum) " PREVIOUS LINE let ind = indent(lnum) let line = getline(lnum) - let f = -1 " wether a '=' is a conditional or a asignment, -1 means we don't know yet - " one 'closing' element at the beginning of the line has already reduced the - " indent, but 'else', 'elseif' & 'then' increment it for the next line - " '=' at the beginning has already de right indent (increased for asignments) + + " Whether a '=' is a conditional or an assignment. -1 means we don't know + " yet. + " One 'closing' element at the beginning of the line has already reduced the + " indent, but 'else', 'elseif' & 'then' increment it for the next line. + " '=' at the beginning already has the right indent (increased for + " asignments). + let f = -1 let inicio = matchend(line, '^\c\s*\(else\a*\|then\|endif\|/[*/]\|[);={]\)') if inicio > 0 let c = line[inicio-1] diff --git a/indent/graphql.vim b/indent/graphql.vim index 97c56309..f6b6fcca 100644 --- a/indent/graphql.vim +++ b/indent/graphql.vim @@ -2,7 +2,7 @@ if polyglot#init#is_disabled(expand('<sfile>:p'), 'graphql', 'indent/graphql.vim finish endif -" Copyright (c) 2016-2020 Jon Parise <jon@indelible.org> +" Copyright (c) 2016-2021 Jon Parise <jon@indelible.org> " " Permission is hereby granted, free of charge, to any person obtaining a copy " of this software and associated documentation files (the "Software"), to diff --git a/indent/julia.vim b/indent/julia.vim index b40823c0..fe53789c 100644 --- a/indent/julia.vim +++ b/indent/julia.vim @@ -295,8 +295,8 @@ function IsFunctionArgPar(lnum, c) if a:c == 0 return 0 endif - let stack = map(synstack(a:lnum, a:c), 'synIDattr(v:val, "name")') - return len(stack) >= 3 && stack[-3] == 'juliaFunctionDefP' + let stack = map(synstack(a:lnum, a:c-1), 'synIDattr(v:val, "name")') + return len(stack) >= 2 && stack[-2] ==# 'juliaFunctionDef' endfunction function JumpToMatch(lnum, last_closed_bracket) |