Giter Club home page Giter Club logo

Comments (5)

welandx avatar welandx commented on September 28, 2024 1

Thank you, now the eldoc-box experience has been taken to the next level.

from eldoc-box.

casouri avatar casouri commented on September 28, 2024 1

Bruh, just found an edge case in the function, use this one instead:

(defun eldoc-box--refontify-markdown-separater ()
    "Replace the display property with one that’s “responsive”."
    (let (prop)
      (while (setq prop (text-property-search-forward 'display))
        (if (and (stringp (prop-match-value prop))
                 (> (length (prop-match-value prop)) 0)
                 (eq (aref (prop-match-value prop) 0) ?─))
            (add-text-properties (prop-match-beginning prop)
                                 (prop-match-end prop)
                                 '( display (space :width text)
                                    face (:strike-through t)))))))

from eldoc-box.

casouri avatar casouri commented on September 28, 2024

Kind of, yeah. Eglot uses markdown-view-mode to render the markdown, and markdown-view-mode uses some width for their render. Anyway, try this:

(defun eldoc-box--refontify-markdown-separater ()
  "Replace the display property with one that’s “responsive”."
  (let (prop)
    (while (setq prop (text-property-search-forward 'display))
      (if (and (stringp (prop-match-value prop))
               (eq (aref (prop-match-value prop) 0) ?─))
          (add-text-properties (prop-match-beginning prop)
                               (prop-match-end prop)
                               '( display (space :width text)
                                  face (:strike-through t)))))))

(add-hook 'eldoc-box-buffer-hook #'eldoc-box--refontify-markdown-separater)

from eldoc-box.

syohex avatar syohex commented on September 28, 2024

I think this issue was fixed by jrblevin/markdown-mode#755. Please upgrade markdown-mode and try again.

from eldoc-box.

casouri avatar casouri commented on September 28, 2024

On top of that, I added some default prettifier (see README), so eldoc-box--refontify-markdown-separater isn't needed anymore.

from eldoc-box.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.