diff options
author | Gregory Anders <greg@gpanders.com> | 2022-07-16 17:46:47 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-07-16 17:46:47 +0100 |
commit | fa49eb482729a5fe7da9c9a5ed8d14f68afa55c7 (patch) | |
tree | 9b71f0399f2a1d4226e4577ad6b58387b0248e69 /runtime | |
parent | c7bd2f08e531f08723cdc677212a3633d11c9a97 (diff) |
Problem: Bitbake files are not detected.
Solution: Add bitbake filetype detection by file name and contents. (Gregory
Anders, closes #10697)
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/autoload/dist/ft.vim | 6 | ||||
-rw-r--r-- | runtime/filetype.vim | 3 |
2 files changed, 7 insertions, 2 deletions
diff --git a/runtime/autoload/dist/ft.vim b/runtime/autoload/dist/ft.vim index a96bdf5e72..708a42a050 100644 --- a/runtime/autoload/dist/ft.vim +++ b/runtime/autoload/dist/ft.vim @@ -519,12 +519,14 @@ export def FTinc() # headers so assume POV-Ray elseif lines =~ '^\s*\%({\|(\*\)' || lines =~? ft_pascal_keywords setf pascal + elseif lines =~# '\<\%(require\|inherit\)\>' || lines =~# '\w\+ = ' + setf bitbake else FTasmsyntax() if exists("b:asmsyntax") - exe "setf " .. fnameescape(b:asmsyntax) + exe "setf " .. fnameescape(b:asmsyntax) else - setf pov + setf pov endif endif endif diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 42bd4be6a6..761ed3f283 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -252,6 +252,9 @@ au BufNewFile,BufRead *.db call dist#ft#BindzoneCheck('') " Blank au BufNewFile,BufRead *.bl setf blank +" Bitbake +au BufNewFile,BufRead *.bb,*.bbappend,*.bbclass,*/build/conf/*.conf,*/meta{-*,}/conf/*.conf setf bitbake + " Blkid cache file au BufNewFile,BufRead */etc/blkid.tab,*/etc/blkid.tab.old setf xml |