Giter Club home page Giter Club logo

Comments (3)

markusfisch avatar markusfisch commented on May 26, 2024

from shadereditor.

AntonPieper avatar AntonPieper commented on May 26, 2024

The Java implementation is flawed IMO, but there also is android-tree-sitter, which is a simple dependency for Gradle. This is already used in their IDE AndroidIDE to highlight XML and Java. They (obviously) don't have GLSL grammar, but this might be a simple task as the developer kindly outlined the steps in an issue I opened. Having tried a simple example using the Java grammar (com.itsaky.androidide:tree-sitter-java:3.0.1), it seems to "just work". There also already is an official (at least linked on the official site) grammar for GLSL: theHamsta/tree-sitter-glsl.

from shadereditor.

AntonPieper avatar AntonPieper commented on May 26, 2024

Hello again!

I think I have now implemented a syntax highlighting solution that works quite fast. The lag now comes from the EditText and not the (separate) SyntaxEditor View. I have also moved the line numbers into its own view, however this has one side effect: when the EditText changes size vertically (i.e. a new line), the phone scrolls to put the cursor at the far left of the screen. I will look into MovementMethod to see if this can be fixed. Maybe this is not that big of a problem? Also I have increased the API level temporarily to use android/trace, this will be reverted. Of course I will open several pull requests for the various changes. You can look at the changed version here: c-highlight branch

from shadereditor.

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.