Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It looks like dprint auto reformat on save is not working on WSL #55

Open
SirMishaa opened this issue Dec 31, 2022 · 2 comments
Open

It looks like dprint auto reformat on save is not working on WSL #55

SirMishaa opened this issue Dec 31, 2022 · 2 comments

Comments

@SirMishaa
Copy link

SirMishaa commented Dec 31, 2022

Hello,

I'm using the latest version of the plugin and when I'm on WSL, the autosave is not working.
But it's working good on my Mac.

Configuration files seems to be here, but I'm not sure how to get log from the daemon.

hexa-node/.idea on  main [!?] on   (eu-central-1)
❯ bat dprintProjectConfig.xml
───────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────
       │ File: dprintProjectConfig.xml
───────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1   │ <?xml version="1.0" encoding="UTF-8"?>
   2   │ <project version="4">
   3   │   <component name="DprintProjectConfiguration">
   4   │     <option name="enabled" value="true" />
   5   │   </component>
   6   │ </project>
───────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────

hexa-node/.idea on  main [!?] on   (eu-central-1)
❯ bat dprintUserConfig.xml
───────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────
       │ File: dprintUserConfig.xml
───────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1   │ <?xml version="1.0" encoding="UTF-8"?>
   2   │ <project version="4">
   3   │   <component name="DprintUserConfiguration">
   4   │     <option name="runOnSave" value="true" />
   5   │   </component>
   6   │ </project>
───────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────

hexa-node/.idea on  main [!?] on   (eu-central-1)
❯

Could you look at it a bit?
Regards

@ryan-rushton
Copy link
Collaborator

Thanks for the report, sorry it took me a bit to get back to you. I will have a look into it over the next couple of weeks.

@ryan-rushton
Copy link
Collaborator

Just musing about this, and @dsherret being a windows user for development you might know better than me, but since WSL and windows in general are using different file systems it could be possible that communication between the dprint daemon that this intellij plugin uses and the wsl filesystem don't work correctly.

@SirMishaa, to get logs, I need the IntelliJ logs in general just after you have tried to format, or alternatively there is a tool window with logs for dprint only, make sure to enable verbose logging in the dprint plugin settings.

Secondly, you might need to specify the base path of the project specifically in settings. The plugin will use the .idea/ folder to get a base path if one is not specified. By setting it explicitly you might be able to get around this.

In any case, I will get wsl installed and have a go at this myself during the week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants