mirror of
https://github.com/neovim/neovim
synced 2025-07-16 09:11:51 +00:00
vim-patch:9.1.0303: filetype: some protocol buffer files not recognized (#28293)
Problem: filetype: some protocol buffer files not recognized
Solution: Detect '*.textproto', '*.textpb', '*.txtpb' as pbtxt files
(Bruno Belanyi)
See: https://protobuf.dev/reference/protobuf/textformat-spec/#text-format-files
closes: vim/vim#14463
e54a8e7c73
Co-authored-by: Bruno BELANYI <bruno@belanyi.fr>
This commit is contained in:
@ -776,6 +776,9 @@ local extension = {
|
||||
pas = 'pascal',
|
||||
lpr = detect_line1('<%?xml', 'xml', 'pascal'),
|
||||
dpr = 'pascal',
|
||||
txtpb = 'pbtxt',
|
||||
textproto = 'pbtxt',
|
||||
textpb = 'pbtxt',
|
||||
pbtxt = 'pbtxt',
|
||||
g = 'pccts',
|
||||
pcmk = 'pcmk',
|
||||
|
@ -523,7 +523,7 @@ func s:GetFilenameChecks() abort
|
||||
\ 'papp': ['file.papp', 'file.pxml', 'file.pxsl'],
|
||||
\ 'pascal': ['file.pas', 'file.dpr', 'file.lpr'],
|
||||
\ 'passwd': ['any/etc/passwd', 'any/etc/passwd-', 'any/etc/passwd.edit', 'any/etc/shadow', 'any/etc/shadow-', 'any/etc/shadow.edit', 'any/var/backups/passwd.bak', 'any/var/backups/shadow.bak', '/etc/passwd', '/etc/passwd-', '/etc/passwd.edit', '/etc/shadow', '/etc/shadow-', '/etc/shadow.edit', '/var/backups/passwd.bak', '/var/backups/shadow.bak'],
|
||||
\ 'pbtxt': ['file.pbtxt'],
|
||||
\ 'pbtxt': ['file.txtpb', 'file.textproto', 'file.textpb', 'file.pbtxt'],
|
||||
\ 'pccts': ['file.g'],
|
||||
\ 'pcmk': ['file.pcmk'],
|
||||
\ 'pdf': ['file.pdf'],
|
||||
|
Reference in New Issue
Block a user