summaryrefslogtreecommitdiffstats
path: root/indent
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2021-01-14 20:59:40 +0100
committerAdam Stankiewicz <sheerun@sher.pl>2021-01-14 20:59:40 +0100
commit22040ce638ed610cfdbba03376ad9864a2a5d321 (patch)
tree43e3ef7cc1a17994bbf1460d0d000dd7e0723168 /indent
parent7bde552a463999897320a1899a6ca4f8806041ea (diff)
downloadvim-polyglot-22040ce638ed610cfdbba03376ad9864a2a5d321.tar.gz
vim-polyglot-22040ce638ed610cfdbba03376ad9864a2a5d321.zip
Update
Diffstat (limited to 'indent')
-rw-r--r--indent/lilypond.vim64
-rw-r--r--indent/systemverilog.vim2
2 files changed, 1 insertions, 65 deletions
diff --git a/indent/lilypond.vim b/indent/lilypond.vim
deleted file mode 100644
index 3d3edb05..00000000
--- a/indent/lilypond.vim
+++ /dev/null
@@ -1,64 +0,0 @@
-if polyglot#init#is_disabled(expand('<sfile>:p'), 'lilypond', 'indent/lilypond.vim')
- finish
-endif
-
-" LilyPond indent file
-" Language: LilyPond
-" Maintainer: Heikki Junes <hjunes@cc.hut.fi>
-" Last Change: 2010 Jul 26
-"
-" Installed As: vim/indent/lilypond.vim
-"
-" Only load this indent file when no other was loaded.
-if exists("b:did_indent")
- finish
-endif
-let b:did_indent = 1
-
-setlocal indentexpr=GetLilyPondIndent()
-setlocal indentkeys=o,O,},>>,!^F
-
-" Only define the function once.
-if exists("*GetLilyPondIndent")
- finish
-endif
-
-function GetLilyPondIndent()
- if v:lnum == 1
- return 0
- endif
-
- "Find a non-blank line above the current line.
- let lnum = prevnonblank(v:lnum - 1)
- "Check if a block was started: '{' or '<<' is the last non-blank character of the previous line.
- if getline(lnum) =~ '^.*\({\|<<\)\s*$'
- let ind = indent(lnum) + &sw
- else
- let ind = indent(lnum)
- endif
-
- "Check if a block was ended: '}' or '>>' is the first non-blank character of the current line.
- if getline(v:lnum) =~ '^\s*\(}\|>>\)'
- let ind = ind - &sw
- endif
-
- " Check if the first character from the previous line is within
- " a `lilyScheme' region, and if so, use lisp-style indentation
- " for the current line.
- "
- " TODO:
- " - Only works in version 7.1.215 or later, though it should
- " silently fail in older versions.
- " - We should support `lilyScheme' regions that begin in the
- " middle of the line, too.
- for id in synstack(lnum, 1)
- if synIDattr(id, "name") == "lilyScheme"
- let ind = lispindent(v:lnum)
- endif
- endfor
-
- return ind
-endfunction
-"
-"
-"
diff --git a/indent/systemverilog.vim b/indent/systemverilog.vim
index 0f8321b5..ed1d97a5 100644
--- a/indent/systemverilog.vim
+++ b/indent/systemverilog.vim
@@ -231,4 +231,4 @@ endfunction
let &cpo = s:cpo_save
unlet s:cpo_save
-" vim:sw=2 \ No newline at end of file
+" vim:sw=2