mirror of
https://github.com/neovim/neovim.git
synced 2026-01-06 11:27:26 +10:00
vim-patch:9.1.1957: filetype: bpftrace files are not recognized (#36838)
Problem: filetype: bpftrace files are not recognized
Solution: Detect *.bt files as btftrace filetype,
include a btftrace filetype plugin (Stanislaw Gruszka)
closes: vim/vim#18866
b60b33a9dc
Co-authored-by: Stanislaw Gruszka <stf_xl@wp.pl>
This commit is contained in:
14
runtime/ftplugin/bpftrace.vim
Normal file
14
runtime/ftplugin/bpftrace.vim
Normal file
@@ -0,0 +1,14 @@
|
||||
" Vim filetype plugin
|
||||
" Language: bpftrace
|
||||
" Maintainer: Stanislaw Gruszka <stf_xl@wp.pl>
|
||||
" Last Change: 2025 Dec 05
|
||||
|
||||
if exists('b:did_ftplugin')
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
|
||||
setlocal commentstring=//\ %s
|
||||
|
||||
let b:undo_ftplugin = "setlocal comments< commentstring<"
|
||||
@@ -267,6 +267,7 @@ local extension = {
|
||||
bl = 'blank',
|
||||
blp = 'blueprint',
|
||||
bp = 'bp',
|
||||
bt = 'bpftrace',
|
||||
bs = 'brighterscript',
|
||||
brs = 'brightscript',
|
||||
bsd = 'bsdl',
|
||||
|
||||
@@ -148,6 +148,7 @@ func s:GetFilenameChecks() abort
|
||||
\ 'blank': ['file.bl'],
|
||||
\ 'blueprint': ['file.blp'],
|
||||
\ 'bp': ['Android.bp'],
|
||||
\ 'bpftrace': ['file.bt'],
|
||||
\ 'brighterscript': ['file.bs'],
|
||||
\ 'brightscript': ['file.brs'],
|
||||
\ 'bsdl': ['file.bsd', 'file.bsdl'],
|
||||
|
||||
Reference in New Issue
Block a user