commit f46060c4cbc1efe100019075214def53fe4d47b3
parent 6afe5cce7964258f7ee0b25ae08faa551bc76090
Author: ObserverOfTime <chronobserver@disroot.org>
Date: Tue, 27 Sep 2022 17:10:19 +0300
vim-patch:9.0.0604: luacheckrc file is not recognized (#20371)
Problem: Luacheckrc file is not recognized.
Solution: Use lua filetype for luacheckrc. (closes vim/vim#11236)
https://github.com/vim/vim/commit/49c311c9b18e18c05f93728d1f8a552923a18423
Diffstat:
3 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
@@ -1113,6 +1113,9 @@ au BufNewFile,BufRead *.lou,*.lout setf lout
" Lua
au BufNewFile,BufRead *.lua setf lua
+" Luacheck
+au BufNewFile,BufRead .luacheckrc setf lua
+
" Luarocks
au BufNewFile,BufRead *.rockspec setf lua
diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua
@@ -1455,6 +1455,7 @@ local filename = {
['.sawfishrc'] = 'lisp',
['/etc/login.access'] = 'loginaccess',
['/etc/login.defs'] = 'logindefs',
+ ['.luacheckrc'] = 'lua',
['lynx.cfg'] = 'lynx',
['m3overrides'] = 'm3build',
['m3makefile'] = 'm3build',
diff --git a/src/nvim/testdir/test_filetype.vim b/src/nvim/testdir/test_filetype.vim
@@ -328,7 +328,7 @@ let s:filename_checks = {
\ 'lpc': ['file.lpc', 'file.ulpc'],
\ 'lsl': ['file.lsl'],
\ 'lss': ['file.lss'],
- \ 'lua': ['file.lua', 'file.rockspec', 'file.nse'],
+ \ 'lua': ['file.lua', 'file.rockspec', 'file.nse', '.luacheckrc'],
\ 'lynx': ['lynx.cfg'],
\ 'lyrics': ['file.lrc'],
\ 'm3build': ['m3makefile', 'm3overrides'],