summaryrefslogtreecommitdiffstats
path: root/indent/kotlin.vim
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2021-12-21 14:41:23 +0100
committerAdam Stankiewicz <sheerun@sher.pl>2021-12-21 14:41:23 +0100
commit87a26c5bf169bafbee837e2323f24cfb07e35250 (patch)
tree326eb21bb10c3d3633b83263d21c85c98f92a67e /indent/kotlin.vim
parent918610d427503c5c7b380eae4a954bd8cb427db5 (diff)
downloadvim-polyglot-87a26c5bf169bafbee837e2323f24cfb07e35250.tar.gz
vim-polyglot-87a26c5bf169bafbee837e2323f24cfb07e35250.zip
Update
Diffstat (limited to 'indent/kotlin.vim')
-rw-r--r--indent/kotlin.vim11
1 files changed, 6 insertions, 5 deletions
diff --git a/indent/kotlin.vim b/indent/kotlin.vim
index 8fdb2f85..fd7e0cea 100644
--- a/indent/kotlin.vim
+++ b/indent/kotlin.vim
@@ -3,9 +3,10 @@ if polyglot#init#is_disabled(expand('<sfile>:p'), 'kotlin', 'indent/kotlin.vim')
endif
" Vim indent file
-" Language: Kotlin
-" Maintainer: Alexander Udalov
-" Latest Revision: 26 May 2019
+" Language: Kotlin
+" Maintainer: Alexander Udalov
+" URL: https://github.com/udalov/kotlin-vim
+" Last Change: 7 November 2021
if exists('b:did_indent')
finish
@@ -49,11 +50,11 @@ function! GetKotlinIndent()
let cur_close_brace = cur =~ '^\s*}.*$'
if prev_open_paren && !cur_close_paren || prev_open_brace && !cur_close_brace
- return prev_indent + &shiftwidth
+ return prev_indent + shiftwidth()
endif
if cur_close_paren && !prev_open_paren || cur_close_brace && !prev_open_brace
- return prev_indent - &shiftwidth
+ return prev_indent - shiftwidth()
endif
return prev_indent