diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2020-07-26 10:20:08 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2020-07-26 10:20:08 +0200 |
commit | 56121b4e27cb48efb17be55a969b2f0d725266f8 (patch) | |
tree | 30df0f431705cdb72b2014177ce3f0655287a81c /indent/julia.vim | |
parent | 9c3c0bc082e0d58d15dc6f24d8a335931417e2f0 (diff) | |
download | vim-polyglot-56121b4e27cb48efb17be55a969b2f0d725266f8.tar.gz vim-polyglot-56121b4e27cb48efb17be55a969b2f0d725266f8.zip |
Update
Diffstat (limited to 'indent/julia.vim')
-rw-r--r-- | indent/julia.vim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/indent/julia.vim b/indent/julia.vim index 59cd7d80..d95fa193 100644 --- a/indent/julia.vim +++ b/indent/julia.vim @@ -270,6 +270,12 @@ function IsInBrackets(lnum, c) return len(stack) > 0 endfunction +function IsInDocString(lnum) + let stack = map(synstack(a:lnum, 1), 'synIDattr(v:val, "name")') + call filter(stack, 'v:val =~# "\\<juliaDocString\\>"') + return len(stack) > 0 +endfunction + " Auxiliary function to find a line which does not start in the middle of a " multiline bracketed expression, to be used as reference for block " indentation. @@ -290,6 +296,11 @@ function LastBlockIndent(lnum) endfunction function GetJuliaIndent() + " Do not alter doctrings indentation + if IsInDocString(v:lnum) + return -1 + endif + " Find a non-blank line above the current line. let lnum = prevnonblank(v:lnum - 1) |