diff options
author | Christian Clason <c.clason@uni-graz.at> | 2022-01-13 18:31:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-13 18:31:15 +0100 |
commit | 596c55756a6a25e8a6d587610292f3e2ca0940b7 (patch) | |
tree | f8d6a5b6db1e32daed2580d45da78b9ec504950c | |
parent | 8066abcd65a672010e7159bcb9601f6eb5481e81 (diff) | |
download | rneovim-596c55756a6a25e8a6d587610292f3e2ca0940b7.tar.gz rneovim-596c55756a6a25e8a6d587610292f3e2ca0940b7.tar.bz2 rneovim-596c55756a6a25e8a6d587610292f3e2ca0940b7.zip |
vim-patch:8.2.4077: not all Libsensors files are recognized (#17080)
Problem: Not all Libsensors files are recognized.
Solution: Add "sensors.d/*" pattern. (Doug Kearns)
https://github.com/vim/vim/commit/8d9e470aa91a93da7d6bda62521aef69a79e956d
-rw-r--r-- | runtime/filetype.vim | 3 | ||||
-rw-r--r-- | runtime/lua/vim/filetype.lua | 1 | ||||
-rw-r--r-- | src/nvim/testdir/test_filetype.vim | 2 |
3 files changed, 5 insertions, 1 deletions
diff --git a/runtime/filetype.vim b/runtime/filetype.vim index aa12a5f8dd..900bbf778d 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -2285,6 +2285,9 @@ au BufNewFile,BufRead Kconfig.* call s:StarSetf('kconfig') " Lilo: Linux loader au BufNewFile,BufRead lilo.conf* call s:StarSetf('lilo') +" Libsensors +au BufNewFile,BufRead */etc/sensors.d/[^.]* call s:StarSetf('sensors') + " Logcheck au BufNewFile,BufRead */etc/logcheck/*.d*/* call s:StarSetf('logcheck') diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua index 3d91abc406..6ba6b3981d 100644 --- a/runtime/lua/vim/filetype.lua +++ b/runtime/lua/vim/filetype.lua @@ -1346,6 +1346,7 @@ local pattern = { [".*/constant/g"] = function() vim.fn["dist#ft#FTfoam"]() end, [".*/0/.*"] = function() vim.fn["dist#ft#FTfoam"]() end, [".*/0%.orig/.*"] = function() vim.fn["dist#ft#FTfoam"]() end, + [".*/etc/sensors%.d/[^.].*"] = starsetf('sensors'), -- END PATTERN } -- luacheck: pop diff --git a/src/nvim/testdir/test_filetype.vim b/src/nvim/testdir/test_filetype.vim index 6e92baa939..f55b9cc1d2 100644 --- a/src/nvim/testdir/test_filetype.vim +++ b/src/nvim/testdir/test_filetype.vim @@ -446,7 +446,7 @@ let s:filename_checks = { \ 'sdc': ['file.sdc'], \ 'sdl': ['file.sdl', 'file.pr'], \ 'sed': ['file.sed'], - \ 'sensors': ['/etc/sensors.conf', '/etc/sensors3.conf', 'any/etc/sensors.conf', 'any/etc/sensors3.conf'], + \ 'sensors': ['/etc/sensors.conf', '/etc/sensors3.conf', '/etc/sensors.d/file', 'any/etc/sensors.conf', 'any/etc/sensors3.conf', 'any/etc/sensors.d/file'], \ 'services': ['/etc/services', 'any/etc/services'], \ 'setserial': ['/etc/serial.conf', 'any/etc/serial.conf'], \ 'sh': ['.bashrc', 'file.bash', '/usr/share/doc/bash-completion/filter.sh','/etc/udev/cdsymlinks.conf', 'any/etc/udev/cdsymlinks.conf'], |