Giter Site home page Giter Site logo

Comments (10)

iqbalansari avatar iqbalansari commented on May 25, 2024

Hi,

I am glad you like the package.

Unfortunately AFAIK it might not be possible to integrate this with prettify-symbol-mode atleast not using the current mechanism, since prettify-symbols-mode uses the composition text property to render the desired keywords with symbols. As such emojify would not be able to search for the text to be displayed as emoji.

However this might be possible via a different mechanism (I am just thinking out aloud), emojify can search for the text which have composition text property set and if the value is an emoji, it can render the underlying text as image. Your thoughts?

from emacs-emojify.

cpitclaudel avatar cpitclaudel commented on May 25, 2024

This definitely sounds like a good idea!
Another option could be to parse the prettify-symbols table and remove the entries that emojify can handle, adding the instead to emojify's own tables.

from emacs-emojify.

iqbalansari avatar iqbalansari commented on May 25, 2024

Hi @cpitclaudel,

I have implemented support for prettify-symbols-mode on a branch, would it be possible for you to give it a try before I push it to MELPA?

Thanks

from emacs-emojify.

cpitclaudel avatar cpitclaudel commented on May 25, 2024

Sure; do I just check that branch out?

from emacs-emojify.

iqbalansari avatar iqbalansari commented on May 25, 2024

Yes that should do it

from emacs-emojify.

cpitclaudel avatar cpitclaudel commented on May 25, 2024

This isn't working for me; maybe I'm doing something wrong.

I have:

(setq prettify-symbols-alist '(("lambda" . 955)
 ("self" . 33258)
 ("yield" . 8674)
 ("return" . 8618)
 ("try" . 128561)
 ("except" . 9936)
 ("raise" . 128165)
 ("assert" . 10003)))

and I ran (emojify-set-emoji-style '(prettify-symbols ascii unicode github))

Typing an explicit 😱 in the source does yield an emoji, but typing try prettifies it to 😱, which does not get emojified.

from emacs-emojify.

iqbalansari avatar iqbalansari commented on May 25, 2024

Sorry my bad, there is a typo in the README, the relevant style here is prettify-symbol not prettify-symbol*s*

from emacs-emojify.

iqbalansari avatar iqbalansari commented on May 25, 2024

Hi, just wanted to let you know that I have merged this to master, it seemed to be working well with my limited testing. It should be available in the next MELPA build.

It is disabled by default, to enable it just do

(emojify-set-emoji-style '(prettify-symbol ascii unicode github))

And re-enable prettify-symbol-mode if it is already enabled. I will enable it by default once I get thumbs up from you 😄

Thanks

from emacs-emojify.

iqbalansari avatar iqbalansari commented on May 25, 2024

Hi @cpitclaudel, you got a chance to try this again?

from emacs-emojify.

cpitclaudel avatar cpitclaudel commented on May 25, 2024

I did! Seems to work great :) I didn't have to re-enable prettify-symbols-mode; it worked out of the box.

Thanks!

from emacs-emojify.

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.