-
Notifications
You must be signed in to change notification settings - Fork 32
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
how does one run mmm-parse-buffer
after the buffer is loaded?
#125
Comments
should help. But |
@dgutov hey thank you I'm glad to read your response. I do have |
should js-mode be the new "default mode" for js? |
That sounds like a bug: either inside Or an incompatibility between the major modes, which they might need extra help with. If the problem is with |
It's not so great, OOTB, for React-style code. There are some extensions for it which can help (e.g. |
@dgutov it works with the syntax highlighting looks a little plain compared to js2-mode but is OK. I'll upload a little screenshots js2-mode and js-mode, simply to share and no other reason |
this calls (run-at-time 1 nil (lambda() (mmm-parse-buffer))) |
Here's the relevant issue: mooz/js2-mode#124 Not on my roadmap currently, but maybe someday. The screenshots look pretty convincing. |
'looping back to give a summary of what happened. The setup here uses eglot with typescript-language-server and flymake to get auto-completion and auto-linting and the result is amazing. This screenshot shows how "icons" are auto-suggested at the import expression --I did not open any files before screenshot and only opened the buffer file with emacs directly, this was added to an eglot hook and to the mmm-mode hook, the delay is acceptable and not overly-intrusive, (add-hook 'eglot-server-initialized-hook (lambda (server) (run-at-time 1 nil (lambda() (mmm-parse-buffer)))))
(add-hook 'mmm-mode-hook (lambda () (run-at-time 1 nil (lambda() (mmm-parse-buffer)))) other than these mmm-mode definitions, everything else are standard (mmm-add-classes
'((js-vue
:submode web-mode
:face mmm-code-submode-face
:front ": `"
:front-offset (end-of-line 1)
:back-offset (end-of-line 1)
:back ">`")))
(mmm-add-mode-ext-class 'js2-mode nil 'js-vue)
(mmm-add-mode-ext-class 'js-mode nil 'js-vue)
(require 'eglot) |
I don't want to bother you and "@" your name dgutov, thank you for using time responding to me and my comments here. Your input is always appreciated by me. |
It's no bother. I see that it's more or less working okay for you, and that's great. I feared the breakage might be more annoying. |
when calling
mmm-parse-buffer
fromjs2-mode-hook
or frommmm-mode-hook
, the buffer is left in a broke state with incorrect syntax-highlighting and indentation. How does one run this command automatically?The text was updated successfully, but these errors were encountered: