Comments (3)
from shadereditor.
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.
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)
- Request: Sub-second accuracy date/daytime uniforms.
- Request: Add extra preset textures
- Request: Support for read+write variable pairs HOT 2
- [Suggestion]: refactor `ShaderRenderer` HOT 2
- QoL: Hide TAB button when code is hidden HOT 1
- QoL: Search bar in Add uniform/texture HOT 2
- Long errors will get trimmed by Android HOT 11
- Different wallpaper shaders for home screen and lock screen HOT 3
- Gyroscope input issues HOT 3
- Sensor didn't work HOT 3
- Variable for dark/night mode HOT 2
- Idea: Use the shaders as custom screensavers
- L0002: Undeclared variable 'iTime' HOT 1
- Touch screen like mouse in computer? HOT 1
- Limit FPS HOT 2
- No matching overload function HOT 2
- Live wallpaper not work in some device HOT 2
- Date and daytime did not update HOT 3
- Request: backbuffer sample
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shadereditor.