-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More language support #30
Comments
@arnav56745 thanks for opening the issue on this! ❤ The features have already been added to the editor, haven't updated this repo yet. Cupcake is basically extracted from the main project to work as a standalone thing. I will work on updating the source code! You can check the main project here: https://github.com/billyeatcookies/biscuit |
If it would be possible for the end user to add custom languages that aren't commonly used that would also be pretty useful. |
@Moosems to make the process simple, using treesitter or textmate grammar files would be great! although I have tried to integrate treesitter before, I failed to get it working right |
I personally don't see the major advantage of using tree sitter. It doesn't support that many languages and if performance is a concern then only highlighting visible areas and reducing what you lex is much better overall. |
@Moosems apart from the highlights done by pygments, I'm also working on LSP client to do semantic syntax highlights. Also, yet another issue occurs when I tried to highlight the visible areas. For example, following python code
|
@billyeatcookies Where will the cupcake editor be in "https://github.com/billyeatcookies/Biscuit/"? Please also give link to folder. |
@arnav56745 You won't be able to use the code directly without some minor modifications :) I would also love to receive any help with updating cupcake repo! ❤️ |
Ahh the multi line docstring/comment (MLCDS as I call it in my personal project). Yes, those absolutely pose an issue. The way I am planning to solve them is highlight the visible area once and, if the tag is found anywhere (keep a persistent memory to look at unhighlighted areas), figure out what created it and if it appears anywhere else in the file. If there are no other that means the end is either in the visible area and is working properly or it is past the visible area and is also working properly. The issue is when the start and end are the same so make pairs and if there's an odd number in the visible area add an end/start tag in the proper place to where the other end of the pair is such that you get the proper highlighting. If that didn't make sense, yeah, there's a lot of stuff going on 😅. |
There's not really any good way to handle them. |
@Moosems I'm thinking the project you mentioned is chlorophyll? I have checked it before, the issue I faced with using the lib directly was that I was not able to modify the proxy set up within chlorophyll 😅 and yes, that's a lot of logic to comprehend, but I've somewhat got the idea xd |
Yeah I have been working with chlorophyll for some time now and enjoy using it. |
@Moosems I have found and I'm currently going through your pr on this! :) rdbende/chlorophyll#35 |
Yeah, I've started by first just getting it to highlight what's visible and now will work on adding MLCDS. |
@billyeatcookies Are you currently working? I am waiting for new update |
@arnav56745 yes, see pr #31 |
@arnav56745 this issue has been considered in new release https://github.com/billyeatcookies/cupcake/releases/tag/v0.25.5 |
Thanks! ❤🙂 |
@arnav56745 the readme has been updated to include further good docs on integrating the editor! |
@billyeatcookies I know! |
I want more language support but only C++ and Plain text is supported. I also want Python support.
The text was updated successfully, but these errors were encountered: