patch 9.1.0315: filetype: a few more dosini files are not recognized
Commit:
https://github.com/vim/vim/commit/0881329d129866fa49444e7fb6e622e54285a8ff
Author: Wu, Zhenyu <[email protected]>
Date: Sat Apr 13 18:13:42 2024 +0200
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: #14512
Signed-off-by: Wu, Zhenyu <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index e3c98e672..7f3704fc3 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -546,9 +546,18 @@ au BufNewFile,BufRead m3makefile,m3overrides setf
m3build
" XDG mimeapps.list
au BufNewFile,BufRead mimeapps.list setf dosini
-" Many Python tools use dosini as their config, like pip, setuptools, pudb,
coverage
+" Many tools written in Python use dosini as their config
+" like setuptools, pudb, coverage, pypi, gitlint, oelint-adv, pylint, bpython,
mypy
" (must be before *.cfg)
-au BufNewFile,BufRead pip.conf,setup.cfg,pudb.cfg,.coveragerc setf dosini
+au BufNewFile,BufRead
pip.conf,setup.cfg,pudb.cfg,.coveragerc,.pypirc,.gitlint,.oelint.cfg setf
dosini
+au BufNewFile,BufRead {.,}pylintrc,*/bpython/config,*/mypy/config
setf dosini
+
+" Many tools written in Python use toml as their config, like black
+au BufNewFile,BufRead .black setf toml
+au BufNewFile,BufRead black
+ \ if getline(1) =~ 'tool.back'
+ \| setf toml
+ \| endif
" LXQt's programs use dosini as their config
au BufNewFile,BufRead */{lxqt,screengrab}/*.conf setf dosini
@@ -565,6 +574,9 @@ au BufNewFile,BufRead *.qc setf c
" ~/.texlive/texmf-config/tex/latex/docstrip/docstrip.cfg
au BufNewFile,BufRead */tex/latex/**.cfg setf tex
+" Wakatime config
+au BufNewFile,BufRead .wakatime.cfg setf dosini
+
" Configure files
au BufNewFile,BufRead *.cfg
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/E1rvgGR-008KwE-4W%40256bit.org.