Closed claytonrcarter closed 3 years ago
Thanks for the comprehensive bug report, it has all the details I needed to track this down quickly.
A fix is merged but for some reason hasn't made it onto MELPA yet. It sounds like you have a good workaround but if you can't wait, you could download and install the tarball from https://github.com/jscheid/prettier.el/actions/runs/363759131
Landed in 20201115.20
Thank you, it's working perfectly!
Describe the bug Thanks for the vue/mmm-mode fix yesterday! Unfortunately, it appears to have introduced a different problem. It appears to be breaking vue-mode when used w/ lsp-mode, but only when started via
(global-prettier-mode t)
Link to
M-x prettier-info
output https://gist.github.com/claytonrcarter/1563171475a5959cc99620f27cbd496f (also includes aninit.el
and error backtrace)To Reproduce Using the
init.el
available in the above gist.emacs -q --load init.el
test-cases/vue-mode/a.original.vue
M-x vue-mode-reparse
This will generate an error in
lsp-buffer-language
, which is called byprettier--guess-js-ish
. This code was introduced yesterday in 6d787fe998a72d0995d1fcc717734d4a2d51619b.Expected behavior If you edit the
init.el
to comment the:config
line and uncomment the:hook
line, the above steps will correctly reparse the buffer w/o error.Additional context I noticed this because I noticed that vue-mode/mmm-mode was no longer correctly updating the mode line w/ the correct sub-mode as I moved around, and that syntax highlighting in the submodes was also broken. FWIW, prettier.el and formatting appear to work as expected and are not affected by this. 😄