SUMMARY There is no "menu item" and no way to create a button for "Format document" action. There is only a possibility to assign hotkey to "Format document" action. But if you need this feature rarely - menu item or button is more convenient. Thank you. STEPS TO REPRODUCE 1. see menu items - no "Format document" 2. try to add button and see available actions - no "Format document" OBSERVED RESULT There is only a possibility to assign hotkey to "Format document" action. EXPECTED RESULT "menu item" and a way to create a button for "Format document" action. SOFTWARE/OS VERSIONS Operating System: Kubuntu 24.04 KDE Plasma Version: 5.27.12 KDE Frameworks Version: 5.115.0 Qt Version: 5.15.13 Kernel Version: 6.8.0-71-generic (64-bit) Graphics Platform: X11 ADDITIONAL INFORMATION
Thanks for reporting. This is fixed in newer versions.
(In reply to Waqar Ahmed from comment #1) > Thanks for reporting. This is fixed in newer versions. ah, i see. do you know in which version this is fixed? thanks.
so i installed latest version 25.08.0. and it has only menu item. but there is still no way to add button. would it be possible to add ability to add button as well? thanks you.
Edit the toolbar and add the format document action to the toolbar
Created attachment 184393 [details] edit toolbar does not have "format" document action
(In reply to Waqar Ahmed from comment #4) > Edit the toolbar and add the format document action to the toolbar i tried that before writing, of course. there is no such action ("format document") available. i attached screenshot.
There are other toolbars in the drop down, "mainToolbar <formatplugin>" has that action.
Created attachment 184403 [details] list of toolbars
(In reply to Waqar Ahmed from comment #7) > There are other toolbars in the drop down, "mainToolbar <formatplugin>" has > that action. but there is no such toolbar in my Kate. i attached the screenshot.
Created attachment 184408 [details] screenshot_waqar Not sure why its not appearing for you. Attaching the screenshot of how it looks like here.
Are you sure the plugin is enabled?
(In reply to Waqar Ahmed from comment #11) > Are you sure the plugin is enabled? yes, it is enabled. i see "format document" in menu. i can use that menu item and hot key - formatting works. but there is no toolbar for that plugin. also if i enable "build&run" , "kate debugger" and "keyboard macros" plugins - "kate debugger" and "keyboard macros" have toolbars, but "build&run" does not (but in your screenshot i see that you have toolbar for it). this is very strange. i use kate 25.08.0 from snap.
for test i also installed Kate 25.08.0 from flatpak - same issue.
Maybe a snap issue... You can try to right click on the menu item and add the action to toolbar
(In reply to Waqar Ahmed from comment #14) > Maybe a snap issue... > > You can try to right click on the menu item and add the action to toolbar right click works the same as left click, for me. and same issue in flatpak. so i am not sure that this is snap issue.
Don't see that toolbar in my master build either.
Git commit ed7de7bc592b0d98be760e67e96d885ccf40efee by Waqar Ahmed. Committed on 25/08/2025 at 06:46. Pushed by waqar into branch 'master'. Add toolbar to formatplugin M +3 -0 addons/format/ui.rc https://invent.kde.org/utilities/kate/-/commit/ed7de7bc592b0d98be760e67e96d885ccf40efee
Seems like I have the toolbar from the days when "right click" on menu items was still working. I have pushed a fix, but you could fix it by modifying the xml file locally. For me, the file is ~/.local/share/kxmlgui5/formatplugin/ui.rc. In the case of snap or flatpak, the location of this file will be different. Add the following line just before the </gui> line. <ToolBar name="mainToolBar" noMerge="1"><text>Format Plugin Toolbar</text></ToolBar>
(In reply to Waqar Ahmed from comment #18) > Seems like I have the toolbar from the days when "right click" on menu items > was still working. I have pushed a fix, but you could fix it by modifying > the xml file locally. For me, the file is > ~/.local/share/kxmlgui5/formatplugin/ui.rc. In the case of snap or flatpak, > the location of this file will be different. Add the following line just > before the </gui> line. > > <ToolBar name="mainToolBar" noMerge="1"><text>Format Plugin > Toolbar</text></ToolBar> now i have panel. thank you! i see that you also fixed build plugin. about >from the days when "right click" on menu items so, should "right click" work on menu items or not? just curious.
> so, should "right click" work on menu items or not? It should work, but is broken atm. Seems like Qt is not sending context menu event to QMenu.
(In reply to Waqar Ahmed from comment #20) > > so, should "right click" work on menu items or not? > > It should work, but is broken atm. Seems like Qt is not sending context menu > event to QMenu. Should I create a new bug about this? Or this bug already reported?