aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2024-08-07 22:06:05 +0200
committerChristian Clason <c.clason@uni-graz.at>2024-08-08 00:17:11 +0200
commitf35d5afbf1bae81896d4b959c7d99cf50e0c306f (patch)
treeec6a42d805cccba7bd747d7c2ae13ff2dc956e7e
parent7031949be065870f0daf74a9f1be3df47f83312c (diff)
downloadrneovim-f35d5afbf1bae81896d4b959c7d99cf50e0c306f.tar.gz
rneovim-f35d5afbf1bae81896d4b959c7d99cf50e0c306f.tar.bz2
rneovim-f35d5afbf1bae81896d4b959c7d99cf50e0c306f.zip
vim-patch:39eff4c: runtime(proto): Add indent script for protobuf filetype
closes: vim/vim#15446 https://github.com/vim/vim/commit/39eff4cdc055a0f0db0d32fcf7a74fe30ea54f25 Co-authored-by: David Pedersen <limero@me.com>
-rw-r--r--runtime/indent/proto.vim19
1 files changed, 19 insertions, 0 deletions
diff --git a/runtime/indent/proto.vim b/runtime/indent/proto.vim
new file mode 100644
index 0000000000..743f14094b
--- /dev/null
+++ b/runtime/indent/proto.vim
@@ -0,0 +1,19 @@
+" Vim indent file
+" Language: Protobuf
+" Maintainer: David Pedersen <limero@me.com>
+" Last Change: 2024 Aug 07
+
+" Only load this indent file when no other was loaded.
+if exists("b:did_indent")
+ finish
+endif
+let b:did_indent = 1
+
+" Protobuf is like indenting C
+setlocal cindent
+setlocal expandtab
+setlocal shiftwidth=2
+
+let b:undo_indent = "setlocal cindent< expandtab< shiftwidth<"
+
+" vim: sw=2 sts=2 et