AndroidIDE icon indicating copy to clipboard operation
AndroidIDE copied to clipboard

[Feature]: Python syntax highlighting to editor

Open drakulaboy opened this issue 2 years ago • 6 comments

Feature description

As title says, can it be added, not python itself but python syntax highlighting to the code editor, please. Screenshot_20231207_100917_com itsaky androidide

What version of AndroidIDE you're using?

v2.6.0 (debug builds)

Duplicate issues

  • [X] This issue has not been reported yet.

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

drakulaboy avatar Dec 07 '23 08:12 drakulaboy

AndroidIDE Crash Report Version : v2.6.1-beta (261) CI Build : true Branch : main Commit : 8ac221c83 Variant : arm64-v8a (release) SDK Version : 30 Supported ABIs : [arm64-v8a, armeabi-v7a, armeabi] Manufacturer : INFINIX MOBILITY LIMITED Device : InfinixX6816C

Stacktrace: java.lang.NullPointerException: null cannot be cast to non-null type com.itsaky.androidide.ui.CodeEditorView at com.itsaky.androidide.activities.editor.EditorHandlerActivity.getEditorForFile(Unknown Source:28) at com.itsaky.androidide.activities.editor.EditorHandlerActivity.closeAll(Unknown Source:43) at com.itsaky.androidide.activities.editor.BaseEditorActivity.onDestroy(Unknown Source:75) at android.app.Activity.performDestroy(Activity.java:8386) at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1344) at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:5238) Caused by: java.lang.RuntimeException: Unable to destroy activity {com.itsaky.androidide/com.itsaky.androidide.activities.editor.EditorActivityKt}: java.lang.NullPointerException: null cannot be cast to non-null type com.itsaky.androidide.ui.CodeEditorView at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:5253) at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:5284) at android.app.servertransaction.DestroyActivityItem.execute(DestroyActivityItem.java:44) at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2125) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:223) at android.app.ActivityThread.main(ActivityThread.java:7999) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:635) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)

Applicationdeveloper143 avatar Dec 08 '23 08:12 Applicationdeveloper143

AndroidIDE Crash Report

you must make a new Issue, delete from here and make new issue

drakulaboy avatar Dec 08 '23 09:12 drakulaboy

Development issue

Applicationdeveloper143 avatar Dec 08 '23 14:12 Applicationdeveloper143

We already have tree sitter grammar for Python language in android-tree-sitter. However, as AndroidIDE is not supposed to be used for Python development, we didn't add syntax highlighting as well. We don't plan to do so due to other high priority issues that need to be resolved.

However, if you want to add Python syntax highlighting to AndroidIDE yourself, I'll be happy to review & accept the PR.

itsaky avatar Dec 12 '23 12:12 itsaky

you want to add Python syntax

i want, i forked the dev branch, cloned locally but when i want to compile it got this error, and on Telegram you said you will take a look

drakulaboy avatar Dec 12 '23 13:12 drakulaboy