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

Add a simple markdown formatter #872

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nemethf
Copy link
Collaborator

@nemethf nemethf commented Mar 12, 2022

Add a built-in markdown formatter derived from org-mode, but prefer
the third-party markdown-mode even if it's not available. Hence, keep
the current behavior unless the user customizes the new variable
`eglot-markup-formatter'.

  • eglot.el (eglot-markup-formatter): New defcustom.
    (eglot-client-capabilities, eglot--format-markup): Use it.
    (eglot-simple-markdown-mode): New defun.

Add a built-in markdown formatter derived from org-mode, but prefer
the third-party markdown-mode even if it's not available.  Hence, keep
the current behavior unless the user customizes the new variable
`eglot-markup-formatter'.

* eglot.el (eglot-markup-formatter): New defcustom.
(eglot-client-capabilities, eglot--format-markup): Use it.
(eglot-simple-markdown-mode): New defun.
@astoff
Copy link
Contributor

astoff commented Mar 24, 2022

I think the following mistakes would happen quite often:

  • asterisks as bullet points -> org headings
  • markdown headings -> org comment

@nemethf
Copy link
Collaborator Author

nemethf commented Mar 28, 2022

I think the following mistakes would happen quite often:

  • asterisks as bullet points -> org headings
  • markdown headings -> org comment

Headings and bullet points are rare in my use-case, and the only practical consequence of those mistakes for me is unusual font-locking. The PR allows me to understand code examples more quickly as they colored. (Another mistakes are unclickable links, but I don't care about that either.)

Maybe this is not for everyone, but I don't propose to be used as a default.

@joaotavora
Copy link
Owner

joaotavora commented Mar 4, 2023 via email

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.

3 participants