Skip to content

Commit ee3f10a

Browse files
sgruszkachrisbra
authored andcommitted
runtime(bpftrace): add indention plugin
Problem: No indention support when editing bpftrace files. Solution: Add indention settings based on cindent with custom options. closes: #19030 Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Christian Brabandt <[email protected]>
1 parent dab78ec commit ee3f10a

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

.github/MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,7 @@ runtime/import/dist/vimhighlight.vim @lacygoill
338338
runtime/indent/arduino.vim @k-takata
339339
runtime/indent/astro.vim @wuelnerdotexe
340340
runtime/indent/basic.vim @dkearns
341+
runtime/indent/bpftrace.vim @sgruszka
341342
runtime/indent/bst.vim @tpope
342343
runtime/indent/cdl.vim @dkearns
343344
runtime/indent/chatito.vim @ObserverOfTime

runtime/indent/bpftrace.vim

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
" Vim indent file
2+
" Language: bpftrace
3+
" Author: Stanislaw Gruszka <[email protected]>
4+
" Last Change: 2025 Dec 27
5+
6+
" Only load this indent file when no other was loaded.
7+
if exists("b:did_indent")
8+
finish
9+
endif
10+
let b:did_indent = 1
11+
12+
setlocal noautoindent nosmartindent
13+
14+
setlocal cindent
15+
setlocal cinoptions=+0,(0,[0,Ws,J1,j1,m1,>s
16+
setlocal cinkeys=0{,0},!^F,o,O,#0
17+
setlocal cinwords=
18+
19+
let b:undo_indent = "setlocal autoindent< smartindent< cindent< cinoptions< cinkeys< cinwords<"

0 commit comments

Comments
 (0)