Closed EldarKurbanov closed 2 years ago
Formatting is triggered when the save document event is triggered. This is done automatically but can be done manually (ctrl+s). After recreating the above-mentioned situation and saving the document manually, the formatting was carried out correctly. I also noticed that after some time the formatting gets done correctly. I also checked on a clean GoLand installation (only default plugins) whether there would be a delay in the autosave of the document. This can be done by formatting the code that is run when the document is saved. In this case, the formatting took place only after a manual save. I conclude that this is an environmental affliction (Linux + GNOME). I work on macOS Monterey on a daily basis with many windows open at the same time and a similar situation never appeared. Please try save the file manually and check if the formatting is correct after that.
I unchecked "Format imports on save" and tried to use "GO import tidy" button in context menu manually and it looks like it works correctly with two opened projects
When you set "Format imports on save" and you use ctrl+s
save shortcut this also should work in current window with multi projects. In other words - for this option save event must be called: manually or automatically. If this not happen (in some case) then formatting imports will not run. If you spot any errors in stored log pleas attache here.
Sort imports happens on file save, but not correctly (like in original issue message). But if I use button in the context menu, it works correctly
In my logs I don't see any messages or errors from tidy plugin. I searched by word "tidy" in idea.log
Can you give an example before sorting and after sorting in the described case (format on save)? I would like to see the anomaly you write about. Maybe I can reproduce it.
I recorded a video: https://www.youtube.com/watch?v=rKHQFNyYPYc
In this video I show:
Thank you. Ill try to reproduce similar situation and fix it
SOLVED: v1.0.8
@EldarKurbanov You can download from GitHub or wait for JetBrains approval to download from official marketplace.
Thank you! I will wait :+1:
Case:
Notes: Checkbox "Format imports on save" is on
Information about my GoLand: