Git Product home page Git Product logo

Comments (4)

akreisher avatar akreisher commented on August 27, 2024

For the prettify-symbols-mode, you need to set prettify-symbols-alist to the appropriate symbol mapping for the major mode. I believe the lambdas in emacs-lisp-mode are converted back to text when copied to the eshell buffer. I think this may do the trick:

(add-hook 'eshell-mode-hook
	  (lambda () (setq-local prettify-symbols-alist '(("lambda" . 955)))))

For the region issue, I believe this is probably due to how the eshell-syntax-highlighting--highlight function strips the existing face in this line. I expect we should be able to just keep the face highlighted here if the region is active. I will look into how to do this properly when I have a bit more time.

from eshell-syntax-highlighting.

ggegoge avatar ggegoge commented on August 27, 2024

Hi,
thank you for the response.

About prettification: I know that it works when copying elisp from an elisp buffer into the Eshell. When writing in the Eshell it doesn't work though.

I have tried to use your code modifying the prettify-symbols-list variable but then whenever I entered the prettify-symbols-mode in Eshell (be it with first enabling global-prettify-symbols-mode and then entering Eshell or entering Eshell and only then enabling the minor mode locally) all the face colours would disappear. Even my prompt which had a colourful part has lost it's colour -- the faces defaulted to default same with all the highlighting from your package. Perhaps the issue has something to do with Eshell and the minor mode in question in general

from eshell-syntax-highlighting.

akreisher avatar akreisher commented on August 27, 2024

I've addressed this issue in 4416a17 by simply disabling highlighting when the region is active. Seems to work well enough.

For the prettify-symbols-mode issue, it may have to do with the fact that neither eshell or this package use font-lock. If prettify-symbol- mode messes with your prompt even without this package enabled, I expect it is prettify-symbol-mode calling font-lock methods, overriding prompt/syntax highlighting.

from eshell-syntax-highlighting.

ggegoge avatar ggegoge commented on August 27, 2024

Just upgraded the package and the highlighting works. Thanks!

from eshell-syntax-highlighting.

Related Issues (7)

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.