vim-patch:9.1.0315: filetype: a few more dosini files are not recognized
Problem: filetype: a few more dosini files are not recognized
Solution: Detect wakatime, reply config files, flatpak, nfs config files
and a few more python tools as dosini (or toml)
(Wu, Zhenyu)
Refer:
- https://packaging.python.org/en/latest/specifications/pypirc/
- https://jorisroovers.com/gitlint/latest/configuration/
- https://pylint.pycqa.org/en/latest/user_guide/usage/run.html#command-line-options
- https://docs.bpython-interpreter.org/en/latest/configuration.html
- https://mypy.readthedocs.io/en/stable/config_file.html#the-mypy-configuration-file
- https://black.readthedocs.io/en/stable/usage_and_configuration/the_basics.html#configuration-via-a-file
- https://github.com/wakatime/wakatime-cli?tab=readme-ov-file#usage
- https://metacpan.org/dist/Reply/view/bin/reply#-cfg-~/.replyrc
close: vim/vim#14512
0881329d12
Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
This commit is contained in:
parent
4c31a1b807
commit
420f130223
|
@ -1338,9 +1338,18 @@ local filename = {
|
|||
['setup.cfg'] = 'dosini',
|
||||
['pudb.cfg'] = 'dosini',
|
||||
['.coveragerc'] = 'dosini',
|
||||
['.pypirc'] = 'dosini',
|
||||
['.pylintrc'] = 'dosini',
|
||||
['pylintrc'] = 'dosini',
|
||||
['.replyrc'] = 'dosini',
|
||||
['.gitlint'] = 'dosini',
|
||||
['.oelint.cfg'] = 'dosini',
|
||||
['psprint.conf'] = 'dosini',
|
||||
sofficerc = 'dosini',
|
||||
['mimeapps.list'] = 'dosini',
|
||||
['.wakatime.cfg'] = 'dosini',
|
||||
['nfs.conf'] = 'dosini',
|
||||
['nfsmount.conf'] = 'dosini',
|
||||
['/etc/pacman.conf'] = 'confini',
|
||||
['mpv.conf'] = 'confini',
|
||||
dune = 'dune',
|
||||
|
@ -1608,6 +1617,8 @@ local filename = {
|
|||
['Gopkg.lock'] = 'toml',
|
||||
['/.cargo/credentials'] = 'toml',
|
||||
['Cargo.lock'] = 'toml',
|
||||
['.black'] = 'toml',
|
||||
black = detect_line1('tool%.black', 'toml', nil),
|
||||
['trustees.conf'] = 'trustees',
|
||||
['.ts_node_repl_history'] = 'typescript',
|
||||
['/etc/udev/udev.conf'] = 'udevconf',
|
||||
|
@ -1758,6 +1769,9 @@ local pattern = {
|
|||
['.*/etc/yum%.conf'] = 'dosini',
|
||||
['.*/lxqt/.*%.conf'] = 'dosini',
|
||||
['.*/screengrab/.*%.conf'] = 'dosini',
|
||||
['.*/bpython/config'] = 'dosini',
|
||||
['.*/mypy/config'] = 'dosini',
|
||||
['.*/flatpak/repo/config'] = 'dosini',
|
||||
['.*lvs'] = 'dracula',
|
||||
['.*lpe'] = 'dracula',
|
||||
['.*/dtrace/.*%.d'] = 'dtrace',
|
||||
|
|
|
@ -213,7 +213,14 @@ func s:GetFilenameChecks() abort
|
|||
\ 'dnsmasq': ['/etc/dnsmasq.conf', '/etc/dnsmasq.d/file', 'any/etc/dnsmasq.conf', 'any/etc/dnsmasq.d/file'],
|
||||
\ 'dockerfile': ['Containerfile', 'Dockerfile', 'dockerfile', 'file.Dockerfile', 'file.dockerfile', 'Dockerfile.debian', 'Containerfile.something'],
|
||||
\ 'dosbatch': ['file.bat'],
|
||||
\ 'dosini': ['/etc/yum.conf', 'file.ini', 'npmrc', '.npmrc', 'php.ini', 'php.ini-5', 'php.ini-file', '/etc/yum.repos.d/file', 'any/etc/yum.conf', 'any/etc/yum.repos.d/file', 'file.wrap', 'file.vbp', 'ja2.ini', 'JA2.INI', 'mimeapps.list', 'pip.conf', 'setup.cfg', 'pudb.cfg', '.coveragerc', 'psprint.conf', 'sofficerc', 'any/.config/lxqt/globalkeyshortcuts.conf', 'any/.config/screengrab/screengrab.conf'],
|
||||
\ 'dosini': ['/etc/yum.conf', '/etc/nfs.conf', '/etc/nfsmount.conf', 'file.ini',
|
||||
\ 'npmrc', '.npmrc', 'php.ini', 'php.ini-5', 'php.ini-file',
|
||||
\ '/etc/yum.repos.d/file', 'any/etc/yum.conf', 'any/etc/yum.repos.d/file', 'file.wrap',
|
||||
\ 'file.vbp', 'ja2.ini', 'JA2.INI', 'mimeapps.list', 'pip.conf', 'setup.cfg', 'pudb.cfg',
|
||||
\ '.coveragerc', '.pypirc', '.gitlint', '.oelint.cfg', 'pylintrc', '.pylintrc',
|
||||
\ '/home/user/.config/bpython/config', '/home/user/.config/mypy/config', '.wakatime.cfg', '.replyrc',
|
||||
\ 'psprint.conf', 'sofficerc', 'any/.config/lxqt/globalkeyshortcuts.conf', 'any/.config/screengrab/screengrab.conf',
|
||||
\ 'any/.local/share/flatpak/repo/config'],
|
||||
\ 'dot': ['file.dot', 'file.gv'],
|
||||
\ 'dracula': ['file.drac', 'file.drc', 'filelvs', 'filelpe', 'drac.file', 'lpe', 'lvs', 'some-lpe', 'some-lvs'],
|
||||
\ 'dtd': ['file.dtd'],
|
||||
|
@ -749,7 +756,7 @@ func s:GetFilenameChecks() abort
|
|||
\ 'tla': ['file.tla'],
|
||||
\ 'tli': ['file.tli'],
|
||||
\ 'tmux': ['tmuxfile.conf', '.tmuxfile.conf', '.tmux-file.conf', '.tmux.conf', 'tmux-file.conf', 'tmux.conf', 'tmux.conf.local'],
|
||||
\ 'toml': ['file.toml', 'Gopkg.lock', 'Pipfile', '/home/user/.cargo/config'],
|
||||
\ 'toml': ['file.toml', 'Gopkg.lock', 'Pipfile', '/home/user/.cargo/config', '.black'],
|
||||
\ 'tpp': ['file.tpp'],
|
||||
\ 'treetop': ['file.treetop'],
|
||||
\ 'trustees': ['trustees.conf'],
|
||||
|
|
Loading…
Reference in New Issue