Giter Club home page Giter Club logo

Comments (7)

curlpipe avatar curlpipe commented on July 17, 2024

Making solid progress on Syntax highlighting, now managed to implement basic syntax highlighting with Rust, plan to add in multiline comment support and fix a few bugs here and there.

image

from ox.

curlpipe avatar curlpipe commented on July 17, 2024

Whoops accidentality closed, such an amateur move!

from ox.

curlpipe avatar curlpipe commented on July 17, 2024

image
I've since fixed issues with overflowing text, they now hold their colours when being trimmed down

from ox.

curlpipe avatar curlpipe commented on July 17, 2024

Now working on multiline highlight support (e.g. multiline comments)

from ox.

sidju avatar sidju commented on July 17, 2024

Good job on setting up your own implementation. I was considering doing the same for a while.
I am using syntect for the initial highlighting in my editor and custom logic for printing, relevant code here.

(You may note that the conversion into crossterm colors is a bit odd. That is because I use a hack to represent ANSI 16-color with the lower bytes of the R if the alpha value is 0 (transparent), as advised by syntects developer. All in all this allows me to support Sublime's syntax and theme definitions, which is pretty neat but has yet to be exploited by me.)

Just if it helps.

from ox.

curlpipe avatar curlpipe commented on July 17, 2024

@sidju Haha you've discovered me talking to myself. I never intended for this to blow up 😆. I looked at syntect but I wasn't comfortable with adding a ton of dependencies to my project as syntect is pretty heavy. I'm currently setting up a different implementation that will render multiline comments properly as the current implementation is a bit buggy here and there. It's going well and hopefully it'll be finished by the end of the week. It's great to see that I'm not the only Rust text editor developer around, i'll be sure to check out your text editor, it looks fantastic!

from ox.

curlpipe avatar curlpipe commented on July 17, 2024

Added in syntax highlighting in latest update, however, it is inefficient in some cases, especially when dealing with a lot of multiline tokens in files. I plan to fix this in a few updates time, for now, I plan to work on adding more crucial features to Ox including multitasking and macros and after that I'll vastly improve efficiency.

from ox.

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.