diff options
author | Gregory Anders <8965202+gpanders@users.noreply.github.com> | 2022-07-27 10:06:09 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-27 10:06:09 -0600 |
commit | 9b447c7ce5bd81d576bcc9253ed77416d9baf59b (patch) | |
tree | 5f4f294794fa2ab0d9917eb594a722d7a8cdb6f3 /runtime | |
parent | f57432af4db184912af7c107f2bba23b5c37473a (diff) | |
download | rneovim-9b447c7ce5bd81d576bcc9253ed77416d9baf59b.tar.gz rneovim-9b447c7ce5bd81d576bcc9253ed77416d9baf59b.tar.bz2 rneovim-9b447c7ce5bd81d576bcc9253ed77416d9baf59b.zip |
vim-patch:9.0.0088: pattern for detecting bitbake files is not sufficient (#19547)
Problem: Pattern for detecting bitbake files is not sufficient.
Solution: Adjust the pattern. (Gregory Anders, closes vim/vim#10743)
https://github.com/vim/vim/commit/30e212dac1d29536883c36918a465a38d81d6413
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/autoload/dist/ft.vim | 2 | ||||
-rw-r--r-- | runtime/lua/vim/filetype/detect.lua | 2 |
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) |