"Prettier syncing config" on every newline in org-babel js source block
bi1yeu opened this issue · 4 comments
Describe the bug
Hi! I'm using Org Babel with a JavaScript code block like this:
#+begin_src js
console.log("Hello, World!");
#+end_src
Whenever I create a new line inside the source code block, the message "Prettier syncing config" appears in the minibuffer, and Emacs hangs for a moment. I don't know if this is a bug, per se, or even whether it's something than can be fixed by prettier.el, but it's impeding my workflow so I figured I'd ask. Any advice is appreciated, thanks in advance!
Link to M-x prettier-info
output
We suggest you copy the output into a Gist after sanitizing it. Make sure to run prettier-info
in the buffer where you experienced the problem. If possible, include a copy of that buffer's contents in the Gist.
To Reproduce
- open a scratch buffer in org-mode
- create a js source code block
- put cursor inside code block and press Enter key
- observe the "Prettier syncing config" message
Expected behavior
A clear and concise description of what you expected to happen.
I'd expect prettier config to sync only once (I think?)
Additional context
Add any other context about the problem here.
I'm using doom-emacs.
Hi, I can reproduce this. I'll have a look to see what can be done about it.
I'm wondering, does this package otherwise work alongside org-mode as you'd expect?
This should be fixed in the latest release.
I've also added an (experimental) function prettier-prettify-org-src-code-at-point
. I might build this out into something more fully featured at a later point, perhaps spun out into its own package. If you are going to use it I'd be keen to hear how you go with it.