Local prettier format on save #1340
-
I'm trying to configure null-ls to run the local prettier to format files on save i.e. the one installed in node_modules. Reading some other discussions, it seems this should work by default? I'm pulling version c0c19f3 of null-ls. I confirmed I can run it using Any help greatly appreciated |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
What about running |
Beta Was this translation helpful? Give feedback.
-
Ok, what ultimately worked was adding svelte to extra_filetypes:
It's interesting that my local .prettierrc has the following, which I thought would be enough for it to find svelte files:
I did confirm changing the .prettierrc file has an effect on how it formats .svelte files in this local project, just to be sure it was using it. Here was part of my debugging process in case it's useful to others:
@jose-elias-alvarez It might be helpful for you in answering these types of questions in the future to have a standard template of baseline info to ask. For example, what is the filetype being formatted that isn't working? |
Beta Was this translation helpful? Give feedback.
Ok, what ultimately worked was adding svelte to extra_filetypes:
It's interesting that my local .prettierrc has the following, which I thought would be enough for it to find svelte files:
I did confirm changing the .prettierrc file has an effect on how it formats .svelte files in this local pr…