aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-04-22 23:51:53 +0800
committerGitHub <noreply@github.com>2023-04-22 23:51:53 +0800
commit1cb46abff1e903e999105b244329f22678ba8a30 (patch)
tree150ba200b697347f3e50b67af5cf9414ccf0d02e
parentccce200cde296aa65a720e028a5eacf715f29e4f (diff)
downloadrneovim-1cb46abff1e903e999105b244329f22678ba8a30.tar.gz
rneovim-1cb46abff1e903e999105b244329f22678ba8a30.tar.bz2
rneovim-1cb46abff1e903e999105b244329f22678ba8a30.zip
vim-patch:9.0.1475: busted configuration files are not recognized (#23266)
Problem: Busted configuration files are not recognized. Solution: Recognize busted configuration files as Lua. (Craig MacEachern, closes vim/vim#12209) Co-authored-by: C.D. MacEachern <craig.daniel.maceachern@gmail.com>
-rw-r--r--runtime/lua/vim/filetype.lua1
-rw-r--r--test/old/testdir/test_filetype.vim2
2 files changed, 2 insertions, 1 deletions
diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua
index 6cfe6e6c35..cbd9aa640b 100644
--- a/runtime/lua/vim/filetype.lua
+++ b/runtime/lua/vim/filetype.lua
@@ -1522,6 +1522,7 @@ local filename = {
['.lsl'] = function(path, bufnr)
return require('vim.filetype.detect').lsl(bufnr)
end,
+ ['.busted'] = 'lua',
['.luacheckrc'] = 'lua',
['lynx.cfg'] = 'lynx',
['m3overrides'] = 'm3build',
diff --git a/test/old/testdir/test_filetype.vim b/test/old/testdir/test_filetype.vim
index a3665e310d..42b80ba868 100644
--- a/test/old/testdir/test_filetype.vim
+++ b/test/old/testdir/test_filetype.vim
@@ -345,7 +345,7 @@ let s:filename_checks = {
\ 'lpc': ['file.lpc', 'file.ulpc'],
\ 'lsl': ['file.lsl'],
\ 'lss': ['file.lss'],
- \ 'lua': ['file.lua', 'file.rockspec', 'file.nse', '.luacheckrc'],
+ \ 'lua': ['file.lua', 'file.rockspec', 'file.nse', '.luacheckrc', '.busted'],
\ 'lynx': ['lynx.cfg'],
\ 'lyrics': ['file.lrc'],
\ 'm3build': ['m3makefile', 'm3overrides'],