Tinhorn/freezed_intellij_live_templates

installing with IntelliJ 2021.2 removes Flutter/Dart plugins

w461 opened this issue · 13 comments

w461 commented

Hi, I tried installing this with 2021.1, however, Freezed never showed up at live templates.

So I have updated to 2021.2. And now, whenever I try to import settings, the plugins of Flutter and Dart are removed upon restart.

I did

  1. File > Manage IDE Settings > Import
  2. select the archive in my downloads folder "freezed_live_templates"
  3. clicked on "import and restart"

Hi w461.
I just tried the import again and it still worked
image
Can you take a screenshot of your live templates around the same area?
This will help me diagnose the issue better.
Thank you!

w461 commented

sure
image

Thanks for the screenshot.
I want you to go to the file directory where live templates are stored.
There should be a freezed XML file in tere
There are different for each OS, but you should be able to find it using the Intellij guide.
Here is a screenshot of my template directory
image

w461 commented

When I install your archive, it removes all files/folders in IdeaIC2021.2 and recreates a few. templates is missing and again flutter/dart need to be re-installed.
In Idea, do I point on freezed_live_templates, templates or anywhere else during import?
Bildschirmfoto 2021-08-10 um 10 19 34

Go to ~/Library/Application Support/JetBrains/IntelliJIdea2021.2/templates
What do you see?
I want to see the screenshot

Same thing happened here! Removed all my settings, was able to restore the backup tho!

Same thing happened here! Removed all my settings, was able to restore the backup tho!

It sounds like you were just able to restore the settings with the zip file again.
Is that correct

@Tinhorn so basically when you import android studio settings the previous ones get saved in $user/library/ApplicationSupport/Google/AndroidStudio3.1-backup (on macos). So i restored from there.

The issue I think is that when you go to File > Manage IDE settings > Import Settings... and you select the unzipped folder downloaded from here Android Studio interprets hit as a folder to ENTIRELY replace the settings already in use, so I find the freezed template, but I loos all the rest of the plugins, all my keymaps etc.

I fixed the issue by manually copy pasting the .xml file content into $user/library/ApplicationSupport/Google/AndroidStudio3.1 (<- without backup, as it is the live version), the restart Android Studio and done!

@scugn1zz0 I always thought it would just add the templates.
Thanks for the detailed comment, you have really helped me out.
I think I will create a plugin for this, so that people don't have to import anything.

Thanks again

@Tinhorn a plugin would be great! Ran into a similar problem

Might be worth calling this out in the README in the meantime so people can avoid this, especially given that this issue is closed, yet the problem still remain.

@ryanhanks-bestow
@scugn1zz0
@w461
This is now a Plugin called "Flutter Freezed Snippets"
Please download that.
Thank you everyone for your patience and help with the problem