Halyra IDE
- 10 Devlogs
- 12 Total hours
A python IDE made with Kotlin Compose Desktop
A python IDE made with Kotlin Compose Desktop
Hi guys!
Its been a long time since i posted my last devlog, the main reason was because…..
LEXER IS SO HARD TO IMPLEMENT
before in Halyra PySide6 Edition, I just used a regex and everything works perfectly, but in Kotlin, somehow it didnt work, so i had to search for techniques and try to implement one myself(Kotlin tutorials are hard to find ಥ_ಥ)
I retried and retried until I got what i wanted, class definition/call rendering, keyword, numbers string, and others rendering perfectly….
I was planning to use parser to detect variable definitions and calls, but It was so hard that i eventually gave up..
Anyways, I made it! I’m aiming for find and replace next ;)
Summary:
After trying 3 different algorithms, I reinspected the code of all my commits and noticed the true issue:
I was trying to make the same implementation to handle different behaviors, which caused the bug.
Basically Tab in editors had two different behaviors:
prin|t(“a”)
after tab:
prin |t(“a”)
the second behavior happens at the start of a line:
|print(“a”)
after tab:
|print("a")
I originally planned to use the same code to detect what the user wants, and it didn’t work well no matter how hard I tried until I separated the two behaviors into two snnipets completely, which just ended the bug that I tried fixing for hours.
I’ll never be lazy again….
found a bug at indenting and still fixing….. Im going to explode
finished indenting part
finished adding auto indenting to the IDE, it was the most difficult task ever…..
at least for now
Finished fixing bugs
added a glitchy syntax higlighting, will continue fixing
Added a not very well-looking custom title bar, I will fix it later
Changed Buttons and migrated to Box() instead of Button
I successfully added line numebrs and auto scrolling, aiming for keyword highlightin next