mirror of
https://github.com/neovim/neovim.git
synced 2026-07-15 13:50:33 +00:00
vim-patch:9.2.0354: filetype: not all Bitbake include files are recognized
Problem: filetype: not all Bitbake include files are recognized
Solution: Enhance the file detection logic and consider varflags
(Martin Schwan)
closes: vim/vim#19983
0e02be1919
Co-authored-by: Martin Schwan <m.schwan@phytec.de>
This commit is contained in:
@@ -936,7 +936,11 @@ function M.inc(path, bufnr)
|
||||
elseif findany(line, { '^%s{', '^%s%(%*' }) or matchregex(line, pascal_keywords) then
|
||||
return 'pascal'
|
||||
elseif
|
||||
findany(line, { '^%s*inherit ', '^%s*require ', '^%s*%u[%w_:${}/]*%s+%??[?:+.]?=.? ' })
|
||||
matchregex(line, [[\<\%(require\|inherit\)\>]])
|
||||
or matchregex(
|
||||
line,
|
||||
[=[[A-Z][A-Za-z0-9_:${}/]*\(\[[A-Za-z0-9_:/]\+\]\)*\s\+\%(??\|[?:+.]\)\?=.\? ]=]
|
||||
)
|
||||
then
|
||||
return 'bitbake'
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user