summaryrefslogtreecommitdiffstats
path: root/runtime/indent
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-11-07 20:27:04 +0000
committerBram Moolenaar <Bram@vim.org>2021-11-07 20:27:04 +0000
commit113cb513f76d8866cbb6dc85fa18aded753e01da (patch)
tree991e2a39e12fe20709be583772ec8038ff3134e5 /runtime/indent
parent15d9890eee53afc61eb0a03b878a19cb5672f732 (diff)
Update runtime files
Diffstat (limited to 'runtime/indent')
-rw-r--r--runtime/indent/clojure.vim19
-rw-r--r--runtime/indent/meson.vim2
-rw-r--r--runtime/indent/vim.vim4
3 files changed, 12 insertions, 13 deletions
diff --git a/runtime/indent/clojure.vim b/runtime/indent/clojure.vim
index 30a0b478e2..fadcaf4b4a 100644
--- a/runtime/indent/clojure.vim
+++ b/runtime/indent/clojure.vim
@@ -1,11 +1,11 @@
" Vim indent file
" Language: Clojure
-" Maintainer: Alex Vear <av@axvr.io>
+" Maintainer: Alex Vear <alex@vear.uk>
" Former Maintainers: Sung Pae <self@sungpae.com>
" Meikel Brandmeyer <mb@kotka.de>
" URL: https://github.com/clojure-vim/clojure.vim
" License: Vim (see :h license)
-" Last Change: 2021-02-13
+" Last Change: 2021-10-26
if exists("b:did_indent")
finish
@@ -24,7 +24,7 @@ setlocal indentkeys=!,o,O
if exists("*searchpairpos")
if !exists('g:clojure_maxlines')
- let g:clojure_maxlines = 100
+ let g:clojure_maxlines = 300
endif
if !exists('g:clojure_fuzzy_indent')
@@ -71,14 +71,10 @@ if exists("*searchpairpos")
return s:current_char() =~# '\v[\(\)\[\]\{\}]' && !s:ignored_region()
endfunction
- " Returns 1 if string matches a pattern in 'patterns', which may be a
- " list of patterns, or a comma-delimited string of implicitly anchored
- " patterns.
+ " Returns 1 if string matches a pattern in 'patterns', which should be
+ " a list of patterns.
function! s:match_one(patterns, string)
- let list = type(a:patterns) == type([])
- \ ? a:patterns
- \ : map(split(a:patterns, ','), '"^" . v:val . "$"')
- for pat in list
+ for pat in a:patterns
if a:string =~# pat | return 1 | endif
endfor
endfunction
@@ -215,9 +211,10 @@ if exists("*searchpairpos")
endfunction
" Check if form is a reader conditional, that is, it is prefixed by #?
- " or @#?
+ " or #?@
function! s:is_reader_conditional_special_case(position)
return getline(a:position[0])[a:position[1] - 3 : a:position[1] - 2] == "#?"
+ \|| getline(a:position[0])[a:position[1] - 4 : a:position[1] - 2] == "#?@"
endfunction
" Returns 1 for opening brackets, -1 for _anything else_.
diff --git a/runtime/indent/meson.vim b/runtime/indent/meson.vim
index 549209ca33..09131f5723 100644
--- a/runtime/indent/meson.vim
+++ b/runtime/indent/meson.vim
@@ -20,6 +20,8 @@ setlocal autoindent " indentexpr isn't much help otherwise
setlocal indentexpr=GetMesonIndent(v:lnum)
setlocal indentkeys+==elif,=else,=endforeach,=endif,0)
+let b:undo_indent = "setl ai< inde< indk< lisp<"
+
" Only define the function once.
if exists("*GetMesonIndent")
finish
diff --git a/runtime/indent/vim.vim b/runtime/indent/vim.vim
index ca1e4725af..d5d0d94b52 100644
--- a/runtime/indent/vim.vim
+++ b/runtime/indent/vim.vim
@@ -1,7 +1,7 @@
" Vim indent file
" Language: Vim script
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2021 Apr 18
+" Last Change: 2021 Nov 03
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
@@ -107,7 +107,7 @@ function GetVimIndentIntern()
if i >= 0
let ind += shiftwidth()
if strpart(prev_text, i, 1) == '|' && has('syntax_items')
- \ && synIDattr(synID(lnum, i, 1), "name") =~ '\(Comment\|String\)$'
+ \ && synIDattr(synID(lnum, i, 1), "name") =~ '\(Comment\|String\|PatSep\)$'
let ind -= shiftwidth()
endif
endif