Skip to content
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

Generate mmm-modes automatically based on a list #6579

Closed
wants to merge 4 commits into from

Conversation

cbrst
Copy link
Contributor

@cbrst cbrst commented Jul 14, 2016

This "fixes" #6571

Question:
Should we really add all possible combinations of languages, or let the user (Spacemacsian) take care of that themselves?

If we keep adding definitions to the core, we'll end up with a terribly long list...

@wookietreiber
Copy link

wookietreiber commented Jul 15, 2016

Shouldn't there be a more DRY way of supporting all languages (or at least all languages from a given list)?

@cbrst
Copy link
Contributor Author

cbrst commented Jul 15, 2016

I don't think there's a fully automated way. But maybe something like this?

I'm on it...

@wookietreiber
Copy link

Yes, this looks definitely less boilerplaty.

Includes a config variable for use in `dotspacemacs-configuration-layers`
@cbrst cbrst changed the title Add markdown-scala support to MMM Generate mmm-modes automatically based on a list Jul 15, 2016
@@ -42,6 +42,18 @@
(defun markdown/post-init-smartparens ()
(add-hook 'markdown-mode-hook 'smartparens-mode))

;; from Jason Blevins http://jblevins.org/log/mmm
(defun markdown/mmm-auto-class (lang &optional submode)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be spacemacs//markdown-mmm-auto-class, shouldn't it?

@wookietreiber
Copy link

I would also like a small section in layers/+lang/markdown/README.org detailing how and where to add these settings to the .spacemacs file.

@cbrst
Copy link
Contributor Author

cbrst commented Jul 15, 2016

There is.
I guess I could add another section for the not-directly relating modes. But I'm not yet sure wether I want to change how those are handled.

@wookietreiber
Copy link

My bad, was looking at master branch. LGTM.

where the mode name is different from the language name
@cbrst
Copy link
Contributor Author

cbrst commented Jul 15, 2016

d439083 just turned this from "meh" to ugly. But hey, it works and removes an additional manual config step.

If someone has an idea how to handle this better, you know what to do.

@TheBB
Copy link
Collaborator

TheBB commented Jul 25, 2016

That's not ugly!

@syl20bnr
Copy link
Owner

Thank you ! 💜
Indeed this is not ugly at all!
I made minor cleanups in commit: 4fd895a9
Cherry-picked into develop branch, you can safely delete your branch.

@syl20bnr syl20bnr closed this Apr 29, 2017
@syl20bnr syl20bnr removed the Merged label Apr 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants