Prettier with vue-mode
- Dominant language
- Emacs Lisp
- Stars
- 22.7k
- Forks
- 3.1k
- Avg merge
- 10h 46m
- Merged PRs (30d)
- 4
Description
### I confirm that...
- [X] I have searched the [issue tracker](https://github.com/doomemacs/doomemacs/issues), [documentation](https://docs.doomemacs.org), [FAQ](https://docs.doomemacs.org/-/faq), [Discourse](https://discourse.doomemacs.org), and [Google](https://google.com), in case this issue has already been reported/resolved.
- [X] I have read "[How to Debug Issues](https://doomemacs.org/d/how2debug)", and will use it to provide as much information about this issue as possible.
- [X] The issue can be reproduced on the **latest** available commit of Doom.
- [X] The issue can be reproduced on a stable release of Emacs, such as 27 or 28. *(Doom does not support development builds like 29+ or any version ending in .50 or .9x)*
### Expected behavior
prettier-js works as expected with vue files.
### Current behavior
I am using vue mode with prettier-js.
In vue mode / vue file when running `prettier-js`, I get initally this error:
`Error in post-command-hook (whitespace-post-command-hook): (wrong-type-argument overlayp nil)`
And then any attempts to run prettier-js fail with error:
`apply: Searching for program: No such file or directory, prettier`
Prettier is in path and it still works with typescript files.

### Steps to reproduce
With following config for vue:
```
(use-package! vue-mode
:mode "\\.vue\\'"
:hook (vue-mode . prettier-js-mode)
:config
(add-hook! 'vue-mode-hook #'lsp)
(setq prettier-js-args '("--parser vue")))
```
1. Open emacs
2. Open vue file
3. run `prettier-js` command
4. observe the error
### System Information
https://pastebin.com/JjGyDBiS
Contributor guide
Research direction
Start by reproducing the failure with the supplied vue-mode and prettier-js-mode configuration, using a Vue file and the `prettier-js` command. Trace the `prettier-js` and `whitespace-post-command-hook` entry points to determine whether the overlay error causes the later missing-program error. Done means prettier formats Vue files while TypeScript formatting continues to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- emacs, emacs-lisp
- Domain
- frontend, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100