aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/autoload/dist/ft.vim2
-rw-r--r--runtime/lua/vim/filetype/detect.lua2
2 files changed, 2 insertions, 2 deletions
diff --git a/runtime/autoload/dist/ft.vim b/runtime/autoload/dist/ft.vim
index 9e30ae1f51..a2f485dd67 100644
--- a/runtime/autoload/dist/ft.vim
+++ b/runtime/autoload/dist/ft.vim
@@ -519,7 +519,7 @@ func dist#ft#FTinc()
" headers so assume POV-Ray
elseif lines =~ '^\s*\%({\|(\*\)' || lines =~? s:ft_pascal_keywords
setf pascal
- elseif lines =~# '\<\%(require\|inherit\)\>' || lines =~# '\w\+ = '
+ elseif lines =~# '\<\%(require\|inherit\)\>' || lines =~# '[A-Z][A-Za-z0-9_:${}]*\s\+\%(??\|[?:+]\)\?= '
setf bitbake
else
call dist#ft#FTasmsyntax()
diff --git a/runtime/lua/vim/filetype/detect.lua b/runtime/lua/vim/filetype/detect.lua
index 8c10517687..14f076717f 100644
--- a/runtime/lua/vim/filetype/detect.lua
+++ b/runtime/lua/vim/filetype/detect.lua
@@ -554,7 +554,7 @@ function M.inc(bufnr)
-- headers so assume POV-Ray
elseif findany(lines, { '^%s{', '^%s%(%*' }) or matchregex(lines, pascal_keywords) then
return 'pascal'
- elseif findany(lines, { '^%s*inherit ', '^%s*require ', '^%s*%w+%s+= ' }) then
+ elseif findany(lines, { '^%s*inherit ', '^%s*require ', '^%s*%u[%w_:${}]*%s+%??[?:+]?= ' }) then
return 'bitbake'
else
local syntax = M.asm_syntax(bufnr)