STEPS TO REPRODUCE 1. Open a file such as /etc/pacmand.d/mirrorlist on Arch OBSERVED RESULT Mode is detected as normal -> I cannot use toggle comment to uncomment stuff, which is a minor annoyance without changing the mode to something more appropriate EXPECTED RESULT I am wondering what the best approach is to improve this. Options include: 1. Keep a curated list of special files. This needs to be updated constantly and I guess there will be lots of files... so this doesn't sound like a great plan. 2. Improve the toggle comment for the normal mode to guess the comment symbol based on what's in the file. Doesn't sound great either. What do you think? SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: (available in About System) KDE Plasma Version: KDE Frameworks Version: Qt Version: ADDITIONAL INFORMATION
For this we have https://docs.kde.org/stable5/en/kate/katepart/config-variables.html that can be specified per file / per dir
Not a huge fan of adding this every time I install a new machine. Is there a file I could add this to so Kate is shipped with this?
Don't understand your question. But besides the above, you can modify/add a highlighting file which will detect the correct mode for the given file. I don't think we can offer a better solution than this. As for your first suggestion; We already keep such a filelist. That's how we are able to recall any document specific changes that are made. This file is called katemodelist or katemodeconfig or something like that. You can copy this file to new machines if you like
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/syntax-highlighting/-/merge_requests/555
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/syntax-highlighting/-/merge_requests/556
Git commit 1723675aa292387fbf30c03cdfaa6fb17c968745 by Eric Armbruster. Committed on 02/10/2023 at 10:11. Pushed by cullmann into branch 'master'. Set mode for more config file endings This sets TOML as mode for .conf,.cfg,.cf,.cnf,.ini and for .rc files. For .cfg,.ini INI is preferred. XML mode is still set for *ui.rc files. See https://en.wikipedia.org/wiki/Configuration_file#Configuration_files_and_operating_systems M +1 -1 autotests/repository_test_base.cpp M +1 -1 data/syntax/ini.xml M +3 -2 data/syntax/toml.xml M +1 -1 data/syntax/xml.xml https://invent.kde.org/frameworks/syntax-highlighting/-/commit/1723675aa292387fbf30c03cdfaa6fb17c968745
Git commit edf7eae1f7cbd1da2e52c8421aeff522032d3cae by Eric Armbruster. Committed on 02/10/2023 at 10:19. Pushed by cullmann into branch 'kf5'. Set mode for more config file endings This sets TOML as mode for .conf,.cfg,.cf,.cnf,.ini and for .rc files. For .cfg,.ini INI is preferred. XML mode is still set for *ui.rc files. See https://en.wikipedia.org/wiki/Configuration_file#Configuration_files_and_operating_systems (cherry picked from commit 1723675aa292387fbf30c03cdfaa6fb17c968745) M +1 -1 autotests/repository_test_base.cpp M +1 -1 data/syntax/ini.xml M +3 -2 data/syntax/toml.xml M +1 -1 data/syntax/xml.xml https://invent.kde.org/frameworks/syntax-highlighting/-/commit/edf7eae1f7cbd1da2e52c8421aeff522032d3cae