-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
markdown mmm scala #6571
Comments
It's enabled, you just need to add scala to the list. https://github.com/syl20bnr/spacemacs/blob/develop/layers/+lang/markdown/packages.el#L159-L208 |
@TheBB Am I supposed to or not to edit this file as a user? I thought I was only supposed to edit the |
@wookietreiber No, you're not. But you can put To answer your second question, mmm is automatically activated. |
@wookietreiber I was suggesting you make a pull request with this contribution, but @crshd beat you to it. We're all users and developers here, if you can excuse my idealism. :-P |
You can't do it in user-init, mmm won't be available that soon. As a rule, the only thing you can do there is to set variables. |
Nope, but in |
Ok, I tested this: my (defun dotspacemacs/user-config ()
"Configuration function for user code.
This function is called at the very end of Spacemacs initialization after
layers configuration.
This is the place where most of your configurations should be done. Unless it is
explicitly specified that a variable should be set before a package is loaded,
you should place your code here."
(mmm-add-classes '((markdown-scala
:submode scala-mode
:face mmm-declaration-submode-face
:front "^```scala[\n\r]+"
:back "^```$")))
(mmm-add-mode-ext-class 'markdown-mode nil 'markdown-scala)
) This is the file I'm editing. I hit , c s and there is a message in the bottom status bar:
The code is not highlighted. Apparently, this does not work for non-ensime projects (ensime is sort of an IDE for Scala in emacs which gets loaded with scala-mode). Is there a way to disable ensime for the Scala mode only within mmm? Something like I tested the same with a Python code block and syntax highlighting works there and the message in the status bar reads:
|
Possibly related to #6578 I'm not sure about disabling ensime for mmm-mode, but as a temporary solution, Since I don't know Scala (or ensime, for that matter), I cannot say if this will break other things, but it does make the highlighting work. |
I can confirm adding |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid! |
Description
I am using the markdown layer and have a markdown file containing Scala code. I would like to have syntax highlighting for the Scala code blocks. I guess this can be done with mmm.
I checked the mmm-mode via SPC h SPC and Scala is missing from
mmm-add-classes
.Also, I don't know and cannot find any documentation about how to enable mmm within the markdown layer.
Reproduction guide
Observed behavior:
Expected behavior:
System Info
The text was updated successfully, but these errors were encountered: